whestbench.
API

iter_mlps

Iterate the MLPs in a Dataset, constructing MLP objects per row.

function · source

iter_mlps(ds: "'Dataset | IterableDataset'") -> 'Iterator[MLP]'
Iterate the MLPs in a Dataset, constructing MLP objects per row.

Accepts both materialised ``Dataset`` and streaming ``IterableDataset``
inputs — iteration is by ``for row in ds:`` either way, so this works
transparently on streaming datasets returned by
``load_dataset(..., streaming=True)``.

Looks up the dataset's seed_protocol via the metadata side-channel to
construct each MLP with the correct estimator-seed derivation. Falls
back to seed_protocol 2.0 semantics if no metadata is attached (e.g.
a Dataset constructed manually for tests).