> ## Documentation Index
> Fetch the complete documentation index at: https://dromeus.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor rounds, loss and model agreement

> Follow a Dromeus run live with dromeus watch, read each node's event log, and configure divergence warnings for models that drift apart.

Every Dromeus node writes a structured event log as it trains: formation, each committed round's loss and public metrics, timing, and how far its model is from the group's. You can follow it live with `dromeus watch`, process it yourself, and add divergence warnings that flag models drifting apart.

## Follow a node live

```bash theme={null}
dromeus watch --run-root runs/regression/node-0
```

`watch` prints one line per event as the node writes it: formation, each committed round (loss, public evaluation metrics, round time and peer) and each consensus distance. It waits for the log to appear and stops when the run completes or fails. Add `--once` to print what's logged so far and exit.

```text theme={null}
round    19  loss 0.001531  mae 0.0482  rmse 0.07429  0.1s  peer fb3a99c5
round    19  consensus distance 0.01584
run complete: 20 rounds committed
```

`watch` exits with `0` when the run completed and `5` when it failed.

## The event log

Each node writes JSON Lines to `<run_root>/logs/dromeus.jsonl`. Records include:

| Record | Contents |
| - | - |
| `node_start` | The node is starting, including its exact PyTorch build |
| `round_metrics` | A committed round's training loss and public evaluation metrics |
| `consensus_observation` | The group's model disagreement for a complete round |
| `node_consensus_distance` | This node's distance from the group's mean model for a round |
| `divergence_status` | A divergence state, warning or scale transition, when a policy is set |

Metrics, consensus and warnings share one bounded background queue, so a slow or failed log write can't block training. A missing record can therefore mean delivery loss; it doesn't mean zero divergence.

## Consensus distance

Every run records each node's distance from the group's mean model, even without a divergence policy. Nodes compare small CountSketch summaries of their models that they already exchange, so measuring adds no network messages. A measurement is made only once every member's sketch for that round has arrived.

`node_consensus_distance` records:

| Field | Meaning |
| - | - |
| `node_id` | The measured node's public key |
| `absolute_distance` | L2 distance from the node's sketch to the group mean |
| `normalized_distance` | `absolute_distance / (mean_sketch_norm + 1e-12)` |
| `group_normalized_rms`, `mean_sketch_norm`, `sketch_count`, `denominator_degenerate` | Context for reading the measurement |

These are approximate distances. They don't measure accuracy or prove convergence: low disagreement can accompany poor accuracy, or all nodes collapsing together. A small mean norm can make normalized distances large, so read the absolute distance alongside.

## Divergence warnings

Add a `DivergencePolicy` to the draft to turn consensus measurements into warnings:

```python theme={null}
dromeus.make_draft(task(), "draft.yaml", ..., divergence=policy)
```

The policy becomes part of the shared draft and its hash. Warnings don't stop training, coordinate peers or change hyperparameters; they are recorded locally as `divergence_status` records.

The detector tracks each node through `warming_up`, `healthy`, `suspect`, `diverging` and `insufficient_data`. After warm-up, for each full window of rounds it compares the median distance of the first half with the second half and fits the slope of the log distance. A warning needs all three growth conditions for `patience_windows` consecutive windows: the later median above `distance_floor`, the median ratio above `growth_ratio`, and the slope above `min_log_slope`. A separate rule (`severe_distance`, `severe_patience`) catches large persistent distances, and recovery needs `recovery_windows` full windows below `recovery_distance`.

> [!WARNING]
>
> Every threshold is explicit, and Dromeus ships no universal default. Thresholds depend on the workload and need calibration.

One policy has been validated, for one workload: a four-worker public CNN digit recipe (MNIST, USPS, SVHN and Optical Digits; 75 rounds of 10 local steps). Across 11 groups without injected faults it raised no false warnings, and it detected all three injected-fault groups within two committed rounds. The policy file, its hash and the full report are in the [M3 evidence](https://github.com/devesh1011/dromeus/blob/v0.3.0/benchmarks/results/m3/README.md). Treat any other thresholds as exploratory until you calibrate them on your workload.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.