# Training

> Training is GPU-only.

`import "github.com/unum-cloud/uform"` 4.0.0-rc.1 · c58749fe

Training is GPU-only. The configuration arrives as structs mirroring the C ones field by field, so a field left at zero is derived by the library:

```go
executor, err := uform.ExecutorForVram([]int32{0, 1}, uform.GPUClassUnknown, nil, uform.CPUClassUnknown, nil, 0)
mesh, err := uform.MeshBootstrap(executor, &uform.MeshOptions{
	HostDomainIndex: rank,
	HostDomainCount: nodes,
	Directory:       "/shared/exchange",
	Job:             "run-17",
})
trainer, err := uform.TrainerInitVram(executor, &uform.TrainerInitVramConfig{
	Mesh:      mesh,
	Depth:     12,
	Hidden:    512,
	Objective: uform.ObjectiveJoint,
	Batch: uform.BatchShape{MaxRowsPerDevice: 64, MaxSegmentsPerDevice: 256, MaxColumnsPerRow: 1024,
		MaxBagsPerDevice: 128, Image: uform.ImageShape{PatchSide: 16}},
	Schedule: uform.Schedule{Steps: 100_000},
	Seed:     42,
})

stats := new(uform.TrainerStepStats)
relations := uform.Relations{Attract: uform.Edges{Offsets: []uint{0, 1, 2, 3, 4}, IDs: []uint32{1, 0, 3, 2}}}
config := &uform.TrainerStepConfig{Bags: []uint32{0, 0, 1, 1}, Relations: relations, Stats: stats}
_, err = trainer.On(executor).Step(modalities, contents, config)
err = trainer.On(executor).Save("checkpoint.safetensors", nil)
```

`BatchShape` nests an `ImageShape`, a `VideoShape` and an `AudioShape`, while `Masking`, `Contrastive`, `LateInteraction`, `Choices` and `Schedule` configure the objectives, and `PairLossForm` picks each contrastive term’s pair loss. `Relations` holds three `Edges` sets as compressed sparse rows, whose offsets and weights the binding checks against the step’s items before the call. A step’s `Sides` give each item a `LateInteractionSide`, and its `Choices` and `ChoiceTargets` give each choice item its legal bytes and their target probabilities as tapes, the shapes `TextChoose` takes and answers. `Step` answers the pooled embeddings the loss scored when its config names an `Arena`, and `Rows` of zero `Count` otherwise. A trainer refers to its mesh, so the mesh outlives every trainer made over it, and `mesh.Describe()` answers a `MeshDescription` whose `MultimemTier` and `GPUClass` describe the run.

## API

### Types

#### `AudioShape`

AudioShape is the audio slice of a batch envelope; a zero ChunkSamples leaves audio out of the run.

[types.go:219 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L219)

```go
type AudioShape struct {
    ChunkSamples uint
    SampleRate uint
}
```

Mirrors uform_audio_shape_t.

#### Fields

| `ChunkSamples` | `uint` | ChunkSamples is the raw samples per frame. |
| - | - | - |
| `SampleRate` | `uint` | SampleRate is the mono rate every recording is resampled to; zero derives 16000. |

#### `BatchShape`

BatchShape is what one device's step carries at most, whatever the modality mix.

[types.go:229 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L229)

```go
type BatchShape struct {
    MaxRowsPerDevice uint
    MaxSegmentsPerDevice uint
    MaxColumnsPerRow uint
    MaxBagsPerDevice uint
    MaxChoicesPerItem uint
    Image ImageShape
    Video VideoShape
    Audio AudioShape
}
```

Mirrors uform_batch_shape_t field for field.

#### Fields

| `MaxRowsPerDevice` | `uint` | MaxRowsPerDevice is the rows one device's step packs. |
| - | - | - |
| `MaxSegmentsPerDevice` | `uint` | MaxSegmentsPerDevice is the items one device's step carries across all its rows. |
| `MaxColumnsPerRow` | `uint` | MaxColumnsPerRow is the positions one row spans. |
| `MaxBagsPerDevice` | `uint` | MaxBagsPerDevice is the bags one device's step carries; zero keeps every item its own unit. |
| `MaxChoicesPerItem` | `uint` | MaxChoicesPerItem is the legal bytes one item offers at most; zero makes no choices. |
| `Image` | `ImageShape` | Image is the image geometry. |
| `Video` | `VideoShape` | Video is the video geometry. |
| `Audio` | `AudioShape` | Audio is the audio geometry. |

#### `Contrastive`

Contrastive is how the contrastive loss scores the pooled embeddings; every zero derives.

[types.go:268 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L268)

```go
type Contrastive struct {
    MatryoshkaDimensions []uint
    TemperatureGroups uint
    InverseTemperature float32
    Bias float32
    Negatives Negatives
    AmbientRepulsionWeight float32
    MaxEdgesPerDevice uint
    PairLoss PairLossForm
}
```

Mirrors uform_contrastive_t.

#### Fields

| `MatryoshkaDimensions` | `[]uint` | MatryoshkaDimensions are the prefix widths scored, strictly ascending multiples of 8, at most 8 of them; empty scores the full width alone. |
| - | - | - |
| `TemperatureGroups` | `uint` | TemperatureGroups is the learnable pairs of an inverse temperature and a bias; zero derives one. |
| `InverseTemperature` | `float32` | InverseTemperature is the starting inverse temperature of every group. |
| `Bias` | `float32` | Bias is the starting logit bias of every group. |
| `Negatives` | `Negatives` | Negatives is which pairs repel. |
| `AmbientRepulsionWeight` | `float32` | AmbientRepulsionWeight is the weight of every pair no edge names under NegativesAmbient. |
| `MaxEdgesPerDevice` | `uint` | MaxEdgesPerDevice is the edges one device's step names per edge set at most; zero derives. |
| `PairLoss` | `PairLossForm` | PairLoss is the pair loss over each anchor's row. |

#### `Edges`

Edges is one edge set over a step's items as compressed sparse rows: item i links to IDs\[Offsets\[i]] up to IDs\[Offsets\[i+1]].

[types.go:391 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L391)

```go
type Edges struct {
    Offsets []uint
    IDs []uint32
    Weights []float32
}
```

Mirrors uform_edges_view_t.

#### Fields

| `Offsets` | `[]uint` | Offsets holds one more entry than the step's items; empty names no edges. |
| - | - | - |
| `IDs` | `[]uint32` | IDs are indices into the step's items, ascending within each run. |
| `Weights` | `[]float32` | Weights holds one weight per ID; empty weighs every edge one. |

#### `ImageShape`

ImageShape is the image slice of a batch envelope; a zero PatchSide leaves images out of the run.

[types.go:194 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L194)

```go
type ImageShape struct {
    PatchSide uint
    Channels uint
}
```

Mirrors uform_image_shape_t.

#### Fields

| `PatchSide` | `uint` | PatchSide is the square patch side images tile into, in pixels. |
| - | - | - |
| `Channels` | `uint` | Channels is the channels every pixel carries; zero derives four. |

#### `LateInteraction`

LateInteraction is how the late-interaction loss scores per-token vectors; every zero derives.

[types.go:292 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L292)

```go
type LateInteraction struct {
    Weight                     float32
    Width                      uint
    InverseTemperature         float32
    Bias                       float32
    MaxQuerySpan               uint
    MaxQueryTokensPerDevice    uint
    MaxDocumentsPerDevice      uint
    MaxDocumentTokensPerDevice uint
    PairLoss                   PairLossForm
}
```

Mirrors uform_late_interaction_t field for field.

#### `Masking`

Masking is how the masked objective corrupts a batch and weighs its heads; every zero derives.

[types.go:251 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L251)

```go
type Masking struct {
    TokenMaskProbability float32
    TokenMeanSpan        float32
    ReplaceFraction      float32
    RandomFraction       float32
    ImageMaskRatio       float32
    VideoMaskRatio       float32
    AudioMaskRatio       float32
    TextWeight           float32
    ImageWeight          float32
    VideoWeight          float32
    AudioWeight          float32
}
```

Mirrors uform_masking_t field for field.

#### `Relations`

Relations is the contrastive targets of one step.

[types.go:403 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L403)

```go
type Relations struct {
    Attract Edges
    Repel   Edges
    Ignore  Edges
}
```

Mirrors uform_relations_view_t.

#### `Schedule`

Schedule is the learning-rate schedule: a linear warmup to the peak, then a cosine decay.

[types.go:315 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L315)

```go
type Schedule struct {
    LearningRate    float32
    MinLearningRate float32
    WarmupSteps     uint
    Steps           uint
}
```

Mirrors uform_schedule_t field for field.

#### `TrainerInitVramConfig`

TrainerInitVramConfig is the geometry, objectives and schedule of a run; zero fields derive.

[types.go:356 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L356)

```go
type TrainerInitVramConfig struct {
    Resume string
    Depth uint
    Hidden uint
    Batch BatchShape
    Objective Objective
    Masking Masking
    Contrastive Contrastive
    LateInteraction LateInteraction
    Choices Choices
    Schedule Schedule
    Mesh *Mesh
    Seed uint64
    Progress ProgressCallback
    ProgressSteps uint
}
```

Mirrors uform_trainer_init_vram_t.

#### Fields

| `Resume` | `string` | Resume is the path of a checkpoint to continue from; empty starts from Seed. |
| - | - | - |
| `Depth` | `uint` | Depth is the transformer blocks stacked. |
| `Hidden` | `uint` | Hidden is the embedding width, a multiple of 128. |
| `Batch` | `BatchShape` | Batch is what one device's step carries at most. |
| `Objective` | `Objective` | Objective is which losses a step relaxes. |
| `Masking` | `Masking` | Masking configures the masked objective. |
| `Contrastive` | `Contrastive` | Contrastive configures the contrastive loss. |
| `LateInteraction` | `LateInteraction` | LateInteraction configures the late-interaction loss. |
| `Choices` | `Choices` | Choices configures the calibrated choices term. |
| `Schedule` | `Schedule` | Schedule is the learning-rate schedule. |
| `Mesh` | `*Mesh` | Mesh must stay open until the trainer is closed; nil runs this process alone. |
| `Seed` | `uint64` | Seed is the base of every keyed draw. |
| `Progress` | `ProgressCallback` | Progress hears the tensors placed on a resume. |
| `ProgressSteps` | `uint` | ProgressSteps is the reports the call makes at most; zero derives ten. |

#### `TrainerSaveConfig`

TrainerSaveConfig holds the knobs of Save; nil derives every field.

[types.go:453 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L453)

```go
type TrainerSaveConfig struct {
    Progress ProgressCallback
    ProgressSteps uint
}
```

#### Fields

| `Progress` | `ProgressCallback` | Progress hears the tensors written. |
| - | - | - |
| `ProgressSteps` | `uint` | ProgressSteps is the reports the call makes at most; zero derives ten. |

#### `TrainerStepConfig`

TrainerStepConfig holds the per-item inputs and knobs of a step beside its modalities and contents; nil derives every field.

[types.go:431 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L431)

```go
type TrainerStepConfig struct {
    Bags []uint32
    TemperatureGroups []uint32
    Sides []LateInteractionSide
    Choices Tape
    ChoiceTargets Tape
    Relations Relations
    Arena *Arena
    OutputsScalar Scalar
    Stats *TrainerStepStats
}
```

Mirrors uform_trainer_step_t.

#### Fields

| `Bags` | `[]uint32` | Bags holds the bag of each item; empty keeps every item its own bag. |
| - | - | - |
| `TemperatureGroups` | `[]uint32` | TemperatureGroups holds the temperature group of each item; empty puts every item in group zero. |
| `Sides` | `[]LateInteractionSide` | Sides holds the late-interaction side of each item; empty takes none into late interaction. |
| `Choices` | `Tape` | Choices holds each item's legal bytes, as TextChoose takes them; the zero Tape makes none. |
| `ChoiceTargets` | `Tape` | ChoiceTargets holds the target probability of each choice, as TextChoose answers them. |
| `Relations` | `Relations` | Relations holds the attract, repel and ignore edges. |
| `Arena` | `*Arena` | Arena receives the pooled embeddings the loss scored; nil skips the copy. |
| `OutputsScalar` | `Scalar` | OutputsScalar is the scalar the embeddings land as. |
| `Stats` | `*TrainerStepStats` | Stats is the report the step overwrites, kept by the caller until it is final; nil skips it. |

#### `TrainerStepStats`

TrainerStepStats is what a step reports, every loss its world mean.

[types.go:412 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L412)

```go
type TrainerStepStats struct {
    Step                uint
    LearningRate        float32
    Loss                float32
    ContrastiveLoss     float32
    MaskedTextLoss      float32
    MaskedImageLoss     float32
    MaskedVideoLoss     float32
    MaskedAudioLoss     float32
    LateInteractionLoss float32
    ChoicesLoss         float32
    Truncated           uint
    Dropped             uint
}
```

Mirrors uform_trainer_step_stats_t field for field, so the library writes it in place.

#### `VideoShape`

VideoShape is the video slice of a batch envelope; a zero PatchSide leaves video out of the run.

[types.go:204 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/types.go#L204)

```go
type VideoShape struct {
    PatchSide uint
    TubeFrames uint
    FrameStride uint
    Channels uint
}
```

Mirrors uform_video_shape_t.

#### Fields

| `PatchSide` | `uint` | PatchSide is the square patch side one tube tiles into, in pixels. |
| - | - | - |
| `TubeFrames` | `uint` | TubeFrames is the frames one tube folds ahead of its patch; zero derives two. |
| `FrameStride` | `uint` | FrameStride is the source frames between sampled ones; zero derives one. |
| `Channels` | `uint` | Channels is the channels every pixel carries; zero derives three. |

#### Enum `LateInteractionSide`

LateInteractionSide is which side of a late-interaction score an item takes.2

[train.go:139 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L139)

```go
type LateInteractionSide int32
```

#### Values

| `LateInteractionSideNone` | | LateInteractionSideNone takes no part in late interaction. |
| - | - | - |
| `LateInteractionSideQuery` | | LateInteractionSideQuery scores the documents the item attracts and repels. |
| `LateInteractionSideDocument` | | LateInteractionSideDocument is scored by the queries naming it. |
| `LateInteractionSideQueryAndDocument` | | LateInteractionSideQueryAndDocument plays both sides. |

##### `LateInteractionSideFromName`

LateInteractionSideFromName reads a side back from the spelling [LateInteractionSide.String](https://www.unum.cloud/docs/uform/go/errors.md#String) renders.

[train.go:159 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L159)

```go
func LateInteractionSideFromName(
    name string,
) (LateInteractionSide, error)
```

##### `String`

String renders the side as the library spells it.

[train.go:153 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L153)

```go
func (side LateInteractionSide) String() string
```

#### Enum `Modality`

Modality is what the bytes of one training item hold.2

[train.go:41 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L41)

```go
type Modality int32
```

#### Values

| `ModalityText` | | ModalityText is UTF-8 text, a byte per token. |
| - | - | - |
| `ModalityImage` | | ModalityImage is a JPEG, PNG or WebP file. |
| `ModalityVideo` | | ModalityVideo is an MP4 or WebM file. |
| `ModalityAudio` | | ModalityAudio is a WAV, FLAC, MP3 or Opus file. |

##### `ModalityFromName`

ModalityFromName reads a modality back from the spelling [Modality.String](https://www.unum.cloud/docs/uform/go/errors.md#String) renders.

[train.go:60 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L60)

```go
func ModalityFromName(name string) (Modality, error)
```

##### `String`

String renders the modality as the library spells it.

[train.go:55 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L55)

```go
func (modality Modality) String() string
```

#### Enum `Negatives`

Negatives is which pairs the contrastive loss pushes apart.2

[train.go:91 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L91)

```go
type Negatives int32
```

#### Values

| `NegativesAmbient` | | NegativesAmbient repels edges, and every pair no edge names at the ambient weight. |
| - | - | - |
| `NegativesNamed` | | NegativesNamed repels edges alone. |

##### `NegativesFromName`

NegativesFromName reads a negatives policy back from the spelling [Negatives.String](https://www.unum.cloud/docs/uform/go/errors.md#String) renders.

[train.go:106 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L106)

```go
func NegativesFromName(name string) (Negatives, error)
```

##### `String`

String renders the policy as the library spells it.

[train.go:101 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L101)

```go
func (negatives Negatives) String() string
```

#### Enum `Objective`

Objective is which losses a step relaxes, one per combination the engine trains.2

[train.go:67 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L67)

```go
type Objective int32
```

#### Values

| `ObjectiveMasked` | | ObjectiveMasked is masked reconstruction alone, as the Base pretrains. |
| - | - | - |
| `ObjectiveContrastive` | | ObjectiveContrastive is the pairwise contrastive loss alone, as the Embedder trains. |
| `ObjectiveJoint` | | ObjectiveJoint is both, joined at the final-norm states. |

##### `ObjectiveFromName`

ObjectiveFromName reads an objective back from the spelling [Objective.String](https://www.unum.cloud/docs/uform/go/errors.md#String) renders.

[train.go:84 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L84)

```go
func ObjectiveFromName(name string) (Objective, error)
```

##### `String`

String renders the objective as the library spells it.

[train.go:79 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L79)

```go
func (objective Objective) String() string
```

#### Enum `PairLossForm`

PairLossForm is how a contrastive term turns a row of scores into forces.2

[train.go:113 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L113)

```go
type PairLossForm int32
```

#### Values

| `PairLossFormDerived` | | PairLossFormDerived keeps the term's own form: sigmoid for pooled vertices, ranked for tokens. |
| - | - | - |
| `PairLossFormBalanced` | | PairLossFormBalanced normalizes the attract and repel halves of every cell apart. |
| `PairLossFormRanked` | | PairLossFormRanked scores every positive over every negative, where the bias cancels. |
| `PairLossFormSigmoid` | | PairLossFormSigmoid is SigLIP's per-cell sigmoid cross-entropy. |

##### `PairLossFormFromName`

PairLossFormFromName reads a pair loss form back from the spelling [PairLossForm.String](https://www.unum.cloud/docs/uform/go/errors.md#String) renders.

[train.go:132 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L132)

```go
func PairLossFormFromName(name string) (PairLossForm, error)
```

##### `String`

String renders the form as the library spells it.

[train.go:127 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L127)

```go
func (form PairLossForm) String() string
```

#### Struct `Trainer`

Trainer is a training run: the tower replicas, gradients, optimizer moments, heads and temperatures on its executor's devices, stepped and saved through that executor.6

[train.go:577 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L577)

```go
type Trainer struct {
    TrainerOn
    // contains filtered or unexported fields
}
```

Its embedded TrainerOn runs every verb on the calling goroutine, and TrainerOn.On on the executor the trainer was made on.

Mirrors uform_trainer_t; Close calls uform_trainer_free.

##### `TrainerInitVram`

TrainerInitVram builds one replica per device of executor and starts or resumes the run; every process of the run calls it with the same geometry, objective and seed.

[train.go:596 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L596)

```go
func TrainerInitVram(
    executor *Executor,
    config *TrainerInitVramConfig,
) (*Trainer, error)
```

Calls uform_trainer_init_vram, blocking.

##### `Close`

Close frees the trainer, waiting for every deferred call naming it.

[train.go:642 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L642)

```go
func (trainer *Trainer) Close() error
```

It is idempotent.

##### `*Deferred`

× 2 Deferred is the receiver whose verbs submit their calls to executor, each answering a Deferred from the same arguments.

[train.go:679 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L679)

Inherited from `TrainerOn`

```go
func (on Trainer) Deferred(executor *Executor) TrainerDeferredOn
```

Binding-only.

##### `*On`

× 2 On is the receiver whose verbs block on executor, the one the trainer was made on.

[train.go:672 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L672)

Inherited from `TrainerOn`

```go
func (on Trainer) On(executor *Executor) TrainerOn
```

Binding-only.

##### `*Save`

× 2 Save writes the weights and the step to a safetensors checkpoint at path, which ModelLoadVram serves and TrainerInitVram resumes; only the process of index zero writes.

[train.go:704 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L704)

Inherited from `TrainerOn`

```go
func (on Trainer) Save(
    path string,
    config *TrainerSaveConfig,
) error
```

Calls uform_trainer_save.

##### `*Step`

× 2 Step applies one optimizer step over this process's items, tagged by modalities, and every peer's, answering the pooled embeddings the loss scored when the config names an arena, and Rows of zero Count otherwise; every process of the run calls it once per step.

[train.go:689 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L689)

Inherited from `TrainerOn`

```go
func (on Trainer) Step(
    modalities []Modality,
    contents Tape,
    config *TrainerStepConfig,
) (Rows, error)
```

Calls uform_trainer_step.

#### Struct `TrainerOn`

TrainerOn is the receiver whose verbs block until their call is final.

[train.go:661 ↗](https://github.com/unum-cloud/UForm/blob/c58749fe4bb208356cc78a87357ab007041c515b/train.go#L661)

```go
type TrainerOn struct {
    // contains filtered or unexported fields
}
```

Binding-only.
