Fixed Splits#
This feature is currently not stable, changes may be applied in the future.
Fixed splits allow to create layouts from predefined splits of data.
thunder.layout.fixed.FixedSplit
#
Bases: Split
Creates experiment layout from given split. Parameters
splits: Sequence Split of data. *names: str Names of folds, e.g. 'train', 'val', test'. Examples
# 3 folds of train-val splits.
split: list = [[[...], [...]],
[[...], [...]],
[[...], [...]]]
layout = FixedSplit(split, "train", "val")
Source code in thunder/layout/fixed.py
thunder.layout.fixed.FixedSingleSplit
#
Bases: SingleSplit
Creates single fold experiment from given split. Parameters
split: Union[Sequence, Dict[str, Sequence]]
split of data
*names: str
Names of folds, e.g. 'train', 'val', test'. If data is of type dict
,
then it is not required.
Examples
split: dict = {"train": [...], "val": [...]}
layout = FixedSingleSplit(split)
# or
split: list = [[...], [...]]
layout = FixedSingeSplit(split, "train", "val")