# Choices

> UForm for Mojo

`from uform import TextChooseConfig, Choices`

## TextChooseConfig

The question types, the progress handler and the report slot of [`text_choose`](https://www.unum.cloud/docs/uform/mojo/models.md#text_choose).

```mojo
struct TextChooseConfig[groups_origin: ImmOrigin = ImmUntrackedOrigin, stats_origin: MutOrigin = MutUntrackedOrigin]
```

- `groups_origin` (comptime): The borrowed question types' origin, inferred where some are lent.
- `stats_origin` (comptime): The lent report slot's origin, inferred where one is lent.

- `temperature_groups` `Span[UInt32, groups_origin]`: The question type of each item, below the model's `choice_temperature_groups`; empty puts every item in group zero.
- `progress` `Progress`: Reports the items scored, and stops the call where it says to.
- `stats` `Optional[Pointer[EncodeStats, stats_origin]]`: Receives the truncation report, overwritten by the call; absent skips it.

Conforms to: `Copyable`, `Deinitable`, `ImplicitlyCopyable`, `Movable`

## __init__

Names only the knobs that differ from the defaults.

```mojo
def __init__(
    out self,
    *,
    temperature_groups: Span[UInt32, groups_origin] = Span(),
    progress: Progress = Progress(),
    stats: Optional[Pointer[EncodeStats, stats_origin]] = Optional()
)
```

## Choices

The calibrated choices over the byte decoder, `uform_choices_t`.

```mojo
struct Choices
```

- `weight` `Float32`: The loss weight; zero trains no choices.
- `brier_weight` `Float32`: The Brier term's weight beside the soft cross-entropy; zero derives 0.5.

Conforms to: `Copyable`, `Defaultable`, `Deinitable`, `ImplicitlyCopyable`, `Movable`

## __init__

Trains no choices.

```mojo
def __init__(out self)
```

