dromeus.TrainingTask describes what a group trains. This page lists its fields and the rules Dromeus enforces on batches, losses and models. For a walkthrough, see Define a task.
Fields
Batches
TensorBatchAdapter(example, definition) accepts dicts, tuples and lists of dense tensors with records on axis 0, including integer token IDs and boolean masks. Shapes after the record axis are fixed; pad sequences to a declared public length.
example is a public or synthetic batch of at least two records. It describes the structure without touching any node’s records. Collation must keep each record intact and must not compute statistics across records. Constants that aren’t per record belong in the model or task code, not in the batch.
Losses
Return a differentiable float tensor of shape[B], one value per record. Don’t call backward() or step an optimizer inside the function. Don’t mix records, read other records, keep raw activations across steps, or publish raw losses.
Token records
Language-model tasks fit the same interface. Store fixed-length integer token records, pad to a declared public length, and freeze the tokenizer vocabulary and sequence boundaries before training.Model checks
Before any record is read, Dromeus checks the model on the publicexample batch.
- Supported: custom containers of compatible operations, shared (tied) parameters, declared frozen parameters and immutable public buffers.
- Exchanged once: each tied parameter. Frozen weights and public buffers aren’t exchanged; they are verified locally. Consensus for a partially frozen model measures trainable parameters only.
- Rejected, with the module path and the missing capability: BatchNorm, cross-record losses, unsafe trainable-layer buffers, uncontrolled model randomness, unbounded streams and changing record populations. There is no silent layer replacement and no non-private fallback.
Checkpoints and exports
Local checkpoints are written under the node’srun_root. They contain optimizer, sampler and accountant state and must not be published. Model-only exports keep the permitted model state, including aliases and declared public constants, so they load into the same architecture.