NIGHTFLOW DOCUMENTATION
Know your workflow.
A practical guide to datasets, settings, experiment tracking, interpretation, model exports, remote machines, and moving projects between computers.
The experiment lifecycle
NightFlow is the desktop workspace; AutoTimm is the Python training engine. Start with a project, configure its model and data, run training, then evaluate and inspect the result.
Projects and runs
A project holds task, dataset, environment, and training settings. A run records an individual experiment and its metrics. Model artifacts and logs are stored in the project directory, while the app keeps project and run records in a local database.
Your dashboard
The dashboard keeps the whole project on one screen. The workspace banner shows the connection, uptime and last sync, and expands into readiness checks for the dataset, its structure, the package manager, Python and AutoTimm. A failing check turns it red and opens it, so you can fix the problem before launching training.
Below it, Current experiment shows the model, dataset, image size and hyperparameters, with training-loss and validation-accuracy charts and the Start training button. Recent results highlights the best validation and test accuracy, Recent runs lists the latest three runs, and Machine health tracks CPU, memory and disk alongside per-GPU load, VRAM and temperature.
The project wizard
Seven steps: where training runs (This machine or a remote instance over SSH), the project name and folder, the task, the model tier, the dataset, optional training settings, and a final review. New projects are stored in ~/.nightflow/projects/<name>/ unless you choose another folder.
Already have an export from NightFlow? Choose Import a project on the start screen or inside the wizard instead of filling in the steps. See Move a project to another computer.
Sync sets up the environment
Before the first run, Connect and then Sync from the dashboard. Sync creates the project folder, installs uv if it is missing, uses it to download Python 3.12 and build a private environment with AutoTimm inside the project folder, validates the dataset, and picks up existing runs. You do not need to install Python yourself, but the first Sync needs network access.
Prepare and explore data
Use the Dataset Browser to inspect image samples, split selection, and class counts. Search and class filters help spot mislabeled examples and unexpected directory layouts.
| Task | Training formats |
|---|---|
| Classification | Class folders or CSV |
| Multi-label classification | CSV with binary label columns |
| Object detection | COCO JSON or CSV annotations |
| Semantic segmentation | PNG masks, COCO, Cityscapes, VOC, or CSV |
| Instance segmentation | COCO JSON or CSV annotations |
For detection and segmentation, a directory of images alone is not enough: annotations must follow the selected loader’s expected layout. A training format being listed does not automatically convert other formats.
Map your CSV columns
Select CSV as your dataset format in the project wizard or settings. Enter exact, case-sensitive headers in the CSV columns section. Use the same column names in the train, validation, and test files.
| Field | Meaning |
|---|---|
| Image path column | The header containing each image filename or path, such as scan_file. |
| Label column | The header containing a single class label, such as diagnosis. |
| Label columns (multi-label) | Comma-separated header names for binary 0/1 label columns. |
| Image / mask root directory | The directory used to resolve relative paths in the dataset. |
Single-label classification
scan_file,diagnosis
images/scan_001.jpg,normal
images/scan_002.jpg,abnormalSet Image path column to scan_file and Label column to diagnosis. Enter your dataset directory as the image root if needed.
Multi-label classification
filename,cat,dog,bird
images/001.jpg,1,0,0
images/002.jpg,1,1,0Set Image path column to filename and Label columns to cat, dog, bird. This format uses one binary column per label, not pipe-separated label strings.
Detection also needs bounding boxes. Instance segmentation needs instance annotations. Semantic segmentation uses image_path and mask_path, or the first two columns; labels come from the mask pixels.
Blank column fields preserve loader defaults. Explicit mappings are more reliable for custom CSV layouts. Existing JSONL datasets must be converted to a supported training format such as CSV.
Configure and train
NightFlow generates config.yaml from saved settings before a run. AutoTimm performs the training and can tune the learning rate and batch size. Tuning behavior depends on the backend; batch-size probing is intended for GPU workloads.
Settings that shape a run
| Group | Controls |
|---|---|
| Model | Task, category, architecture, learning rate, optimizer, scheduler, weight decay, and supported backbone freezing. |
| Data | Dataset paths and column mappings, batch size, image size, augmentation preset, and loader workers. |
| Trainer | Epoch count, accelerator, CUDA device indices, precision, gradient clipping, and early stopping. |
| Reproducibility | Seed, plus an optional compilation setting. Empty seed leaves seeding unset. |
Setting the scheduler to none writes YAML null. Zero-valued options such as loader workers and early-stopping patience are preserved. YOLOX receives its own model name and epoch schedule rather than unsupported backbone-freezing arguments.
A classification configuration
This shortened example shows how your settings map to AutoTimm. Replace the paths with real files. NightFlow also adds metrics and run logging to generated configurations.
seed_everything: 42
model:
class_path: autotimm.ImageClassifier
init_args:
backbone: mobilenetv2_100
num_classes: 2
compile_model: false
data:
class_path: autotimm.ImageDataModule
init_args:
train_csv: "/data/train.csv"
val_csv: "/data/val.csv"
test_csv: "/data/test.csv"
image_dir: "/data"
image_column: "scan_file"
label_column: "diagnosis"
batch_size: 16
trainer:
max_epochs: 10
accelerator: auto
devices: auto
precision: "32-true"NightFlow regenerates the configuration before training. Make persistent changes in project settings rather than editing the generated file alone.
Sequential runs
The run queue processes queued jobs for a project in sequence. Inspect the status and output of each run before interpreting its results.
Find every setting
Open Settings for any project. Each project remembers which section you had open. Leave a field blank to use the AutoTimm default; press ⌘ / Ctrl + S to save.
| Section | What it holds |
|---|---|
| General | Project name and folder, plus an overview of every section. |
| Connection | This machine or remote (SSH), the SSH command, and the SSH key the project uses. |
| Dataset | Format, dataset folder or CSV files, image folder, CSV columns, and class count. |
| Model | Model tier, detection architecture or segmentation head, backbone freezing, and compilation. |
| Hyperparameters | Epochs, batch size, seed, learning rate, optimizer, scheduler, weight decay, gradient clipping, and early stopping. |
| Input & augmentation | Image size and augmentation preset, with a preview on a sample image. |
| Hardware | Accelerator, CUDA device indices, precision, and data-loader workers. |
| Appearance | Theme and the app tour. |
| SSH keys | Keys NightFlow may use for remote projects. See Manage SSH keys. |
| Import / export | Export the project or import one. See Move a project. |
| Danger zone | Delete the project (with an offer to export it first) or clear all app data. |
This keeps the configuration from changing under a running job. Disconnect on the dashboard to edit; saved changes trigger a fresh sync on the next connect.
Choose an accelerator
Use Auto to let the training environment choose a backend, or select CUDA, Metal (MPS), or CPU in advanced settings. CPU and Metal use a single device. CUDA indices select GPUs visible to that process.
| Setting | Practical guidance |
|---|---|
| Auto | Useful when a project will run in different compatible environments. |
| CUDA | Provide unique device indices, for example 0 or 0,1. Clear indices when switching to another backend. |
| Metal / MPS | Use on supported Macs. Float64 is not supported. |
| CPU | Works without a GPU; smaller models and datasets help keep iteration times manageable. |
| Precision and compilation | Full 32-bit precision with compilation off is the portable starting point. Validate optional optimizations on your machine. |
Hardware availability does not guarantee that every model operation is implemented on every backend. Verify your chosen task with a small run.
Compare the evidence
Experiments retains run status, parameters, curves, and metrics so you can compare changes across experiments. Use tags and notes to preserve the reason for a run, not just its outcome.
Read training and validation together
Training loss shows how the model fits the data it sees during optimization. Validation metrics help assess whether improvements transfer to held-out data. Compare runs with the same split and metric definitions.
A final test set should remain separate from model-selection decisions. Accuracy alone can hide class imbalance: review precision, recall, F1, and the confusion matrix where available.
Investigate model behavior
Choose a completed run with an available checkpoint, supply an image, and explore supported attribution methods: GradCAM, GradCAM++, Integrated Gradients, SmoothGrad, Attention Rollout, and Attention Flow.
Method compatibility depends on the architecture and task. Attribution maps are diagnostic aids; they do not establish that a model’s predictions are correct or causally explained.
Inspect the model graph
The integrated Netron viewer loads a TorchScript export for architecture inspection. Keep the run’s checkpoint available so the model can be exported.
Move from training to deployment
Use a completed run’s model export and inference tools to prepare an artifact for the target environment. Check exported predictions against the original model with representative inputs.
| Format | Typical use |
|---|---|
| TorchScript | PyTorch-based inference and the integrated model viewer. |
| ONNX | Runtime interoperability with ONNX-compatible deployment tools. |
| TensorRT | Compatible NVIDIA inference deployments; requires the appropriate NVIDIA software and hardware. |
Export support varies by architecture and operator set. The inference tools also support optional Hugging Face Hub sharing; uploading a model is an explicit network operation.
Move a project to another computer
Use Settings → Import / export → Export… to package the open project. Choose how much to include:
| Level | Contains | File |
|---|---|---|
| Lite | Project settings only: a template for a similar project. | .json |
| Standard | Settings plus every run record: metrics, notes, tags, and test results. | .json |
| Full | Standard plus the run files: logs, checkpoints, and exported models. Optionally the dataset too. | .nightflow |
Full exports
Before exporting, NightFlow measures the run folders and shows what it found, such as the number of trained models and checkpoints. Choose which checkpoints to include: best and last (the default), all, or none. “Best” is each run’s newest checkpoint other than last.ckpt. For remote projects, files are streamed from the server over SSH. When the export finishes, the dialog lists exactly what went into the archive.
Turn on Include dataset to pack the dataset folder, or the CSV files and image folder. On import the dataset is placed in <project folder>/dataset/ and the project’s dataset paths are updated to match. Absolute image paths written inside CSV files are not rewritten.
Connection details and paths
Include connection details keeps the SSH command and the project and dataset paths; turn it off to share a project without them. Paths inside your home folder are stored as ~/…, so they still work for another user name or operating system. Paths on a remote server are kept as they are.
Importing
Import from Import a project on the start screen, inside the new-project wizard, or Settings → Import / export. A preview shows the project, its level, and what the archive contains. Create a new project, or replace the open project’s settings and runs (after confirmation; files in its folder are not deleted). For each dataset path, NightFlow checks whether it exists on this computer and lets you browse to the right location.
Importing next to the original project never overwrites its runs. In a Full import, each run folder is renamed to match its new ID so that syncing finds it. The Python environment is not exported; Sync rebuilds it on the new computer.
Remote machines and terminals
A remote project connects to a server over SSH using your system’s OpenSSH, so ~/.ssh/config aliases, jump hosts, and agent forwarding behave as usual. Sync sets up uv, Python 3.12, and AutoTimm on the server, and Machine health reports the server’s CPU, memory, disk, and GPUs.
The training launcher starts local processes only; pressing Start training on a remote project shows an explicit error. To train on the server, run AutoTimm in a terminal tab connected to it, with configuration and data paths that exist on that server.
Terminal tabs
The Terminal view opens a shell in the project, or an SSH session for a remote project. Add tabs with +, ⌘ T on macOS, or Ctrl + Shift + T elsewhere. Each extra tab runs its own shell (for remote projects, its own SSH connection). Close a tab with its × or a middle-click; any tab can close while another is open, and closing the first tab does not disconnect the project. Disconnecting the project closes its extra tabs.
Manage SSH keys
NightFlow only offers keys you add in Settings → SSH keys. It stores the paths to your keys, never their contents.
- Add existing keys found in
~/.ssh, or check a key anywhere on disk. Each shows its type, fingerprint, and problems such as permissions that ssh would refuse. - Create a new key (Ed25519 or RSA 4096, optional passphrase). NightFlow shows the public key and the
ssh-copy-idcommand to install it on the server. The passphrase is typed intossh-keygenthrough a terminal, never placed on a command line. - Choose a key per project under Settings → Connection → SSH key. NightFlow then adds
-i <key> -o IdentitiesOnly=yesto the project’s SSH command, so the server is offered only that key.
NightFlow connects without an interactive terminal, so passphrase-protected keys must be loaded into ssh-agent first (for example ssh-add --apple-use-keychain ~/.ssh/key on macOS).
Keyboard navigation
| Shortcut | Action |
|---|---|
| ⌘ / Ctrl + 1 | Dashboard |
| ⌘ / Ctrl + 2 | Experiments |
| ⌘ / Ctrl + 3 | Dataset Browser |
| ⌘ / Ctrl + 4 | Interpretation |
| ⌘ / Ctrl + 5 | Model Viewer |
| ⌘ / Ctrl + 6 | Terminal |
| ⌘ / Ctrl + 7 | Settings |
| ⌘ / Ctrl + K | Shortcut reference |
| ⌘ / Ctrl + Enter | Start training |
| ⌘ / Ctrl + S | Save changes in Settings |
| ⌘ T (macOS) · Ctrl + Shift + T | New terminal tab |
| Esc | Close the open dialog |
When something needs attention
The CSV preview says a column is missing.
Check the spelling, capitalization, and whitespace in your header names. Confirm that all dataset splits have the same headers and that the selected image root resolves your relative paths.
My accelerator is unavailable.
Check the PyTorch installation in the environment used by the project. CUDA needs a compatible driver and build; Metal needs MPS support. Try CPU to isolate backend-specific issues.
Training stops before the first epoch.
Inspect the generated configuration, dataset validation messages, and run logs. Confirm that classes, annotations, paths, and selected model are compatible.
I cannot interpret or export a run.
Confirm that its checkpoint still exists and that the method or export format supports the task and architecture. A run record alone is not a model artifact.
A dataset path is “not found” after moving to another computer.
Point it at the dataset’s location in the import dialog or in Settings → Dataset. To avoid this, export with Include dataset so the files travel with the project.
SSH says “Permission denied” or “Too many authentication failures”.
Choose the right key under Settings → Connection → SSH key and make sure its public key is in the server’s ~/.ssh/authorized_keys. A passphrase-protected key must be loaded into ssh-agent.
A key is marked “permissions too open”.
Run the chmod 600 command shown in Settings → SSH keys, then press Re-check.