split¶
Split a dataset into configurable named splits.
Functions
|
Parse a name:percentage split specification. |
|
Split a dataset into named partitions. |
- undertale.utils.datasets.split.parse_split(value: str) Tuple[str, float]¶
Parse a name:percentage split specification.
- Parameters:
value – A string in
"name:percentage"format.- Returns:
A tuple of
(name, percentage).- Raises:
argparse.ArgumentTypeError – If the value is not in the expected format.
- undertale.utils.datasets.split.split(source: str, output: str, splits: List[Tuple[str, float]], seed: int = 42) None¶
Split a dataset into named partitions.
- Parameters:
source – Path to the input dataset.
output – Base path for output directories. Each split is written to
"{output}-{name}".splits – A list of
(name, percentage)tuples. Percentages must sum to 100.seed – Random seed for reproducibility.
- Raises:
ValueError – If split percentages do not sum to 100.