Add number of repeats for a dataset in the ui

This commit is contained in:
Jaret Burkett
2026-01-15 08:03:31 -07:00
parent e40d7ac605
commit e132dbae76
4 changed files with 21 additions and 0 deletions

View File

@@ -810,6 +810,14 @@ export default function SimpleJob({
onChange={value => setJobConfig(value, `config.process[0].datasets[${i}].network_weight`)}
placeholder="eg. 1.0"
/>
<NumberInput
label="Num Repeats"
value={dataset.num_repeats || 1}
className="pt-2"
onChange={value => setJobConfig(value, `config.process[0].datasets[${i}].num_repeats`)}
placeholder="eg. 1"
docKey={'dataset.num_repeats'}
/>
</div>
<div>
<TextInput

View File

@@ -16,6 +16,7 @@ export const defaultDatasetConfig: DatasetConfig = {
num_frames: 1,
flip_x: false,
flip_y: false,
num_repeats: 1,
};
export const defaultSliderConfig: SliderConfig = {

View File

@@ -306,6 +306,17 @@ const docs: { [key: string]: ConfigDoc } = {
</>
),
},
'dataset.num_repeats': {
title: 'Num Repeats',
description: (
<>
Number of Repeats will allow you to repeate the items in a dataset multiple times. This is useful when you are using multiple
datasets and want to balance the number of samples from each dataset. For instance, if you have a small dataset of 10 images
and a large dataset of 100 images, you can set the small dataset to have 10 repeats to effectively make it 100 images, making
the two datasets occour equally during training.
</>
),
},
};
export const getDoc = (key: string | null | undefined): ConfigDoc | null => {

View File

@@ -103,6 +103,7 @@ export interface DatasetConfig {
fps?: number;
flip_x: boolean;
flip_y: boolean;
num_repeats?: number;
control_path_1?: string | null;
control_path_2?: string | null;
control_path_3?: string | null;