You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/DATALOADER.es.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -551,6 +551,24 @@ Esto es especialmente útil cuando:
551
551
- Sin sobresuscripción: se lanza un error
552
552
- Con `--allow_dataset_oversubscription`: repeats ajustado automáticamente a 1 (25 × 2 = 50 muestras)
553
553
554
+
### `max_num_samples`
555
+
556
+
-**Descripción:** Limita el dataset a un número máximo de muestras. Cuando se establece, se selecciona un subconjunto aleatorio determinista del tamaño especificado del dataset completo.
557
+
-**Caso de uso:** Útil para grandes datasets de regularización donde deseas usar solo una parte de los datos para evitar dominar conjuntos de entrenamiento más pequeños.
558
+
-**Selección determinista:** La selección aleatoria usa el `id` del dataset como semilla, asegurando que el mismo subconjunto sea seleccionado entre sesiones de entrenamiento para reproducibilidad.
559
+
-**Por defecto:**`null` (sin límite, se usan todas las muestras)
560
+
561
+
#### Ejemplo
562
+
```json
563
+
{
564
+
"id": "regularization-data",
565
+
"max_num_samples": 1000,
566
+
...
567
+
}
568
+
```
569
+
570
+
Esto seleccionará de forma determinista 1000 muestras del dataset, con la misma selección utilizada cada vez que se ejecute el entrenamiento.
571
+
554
572
### `start_epoch` / `start_step`
555
573
556
574
- Programa cuándo un dataset empieza a muestrear.
@@ -559,6 +577,38 @@ Esto es especialmente útil cuando:
559
577
- Los datasets que nunca cumplen su condición de inicio (por ejemplo, `start_epoch` más allá de `--num_train_epochs`) se omitirán y se anotarán en la model card.
560
578
- Las estimaciones de pasos en la barra de progreso son aproximadas cuando los datasets programados se activan a mitad de ejecución porque la longitud de la época puede aumentar cuando nuevos datos entran en línea.
561
579
580
+
### `end_epoch` / `end_step`
581
+
582
+
- Programa cuándo un dataset **deja** de muestrear (complementando `start_epoch`/`start_step`).
583
+
-`end_epoch` (default: `null` = sin límite) detiene el muestreo después de esta época; `end_step` (default: `null` = sin límite) detiene el muestreo después de este paso de optimizador.
584
+
- Cualquiera de las condiciones que termine detendrá el dataset; funcionan de forma independiente.
585
+
- Útil para flujos de trabajo de **aprendizaje curricular** donde deseas:
586
+
- Entrenar con datos de baja resolución primero, luego cambiar a datos de mayor resolución.
587
+
- Eliminar gradualmente los datos de regularización después de cierto punto.
588
+
- Crear entrenamiento multi-etapa dentro de un solo archivo de configuración.
589
+
590
+
**Ejemplo: Aprendizaje Curricular**
591
+
```json
592
+
[
593
+
{
594
+
"id": "lowres-512",
595
+
"type": "local",
596
+
"dataset_type": "image",
597
+
"instance_data_dir": "/data/512",
598
+
"end_step": 300
599
+
},
600
+
{
601
+
"id": "highres-1024",
602
+
"type": "local",
603
+
"dataset_type": "image",
604
+
"instance_data_dir": "/data/1024",
605
+
"start_step": 300
606
+
}
607
+
]
608
+
```
609
+
610
+
En este ejemplo, el dataset de 512px se usa para los pasos 1-300, luego el dataset de 1024px toma el control desde el paso 300 en adelante.
611
+
562
612
### `is_regularisation_data`
563
613
564
614
- También puede escribirse `is_regularization_data`
@@ -579,6 +629,32 @@ Esto es especialmente útil cuando:
579
629
-**Advertencia:** Esto es destructivo y no se puede deshacer. Úsalo con cuidado.
580
630
-**Default:** Usa el argumento `--delete_problematic_images` del trainer (default: `false`).
581
631
632
+
### Ver Estadísticas de Filtrado
633
+
634
+
Cuando SimpleTuner procesa tu dataset, rastrea cuántos archivos fueron filtrados y por qué. Estas estadísticas se almacenan en el archivo de caché del dataset (`aspect_ratio_bucket_indices_*.json`) y pueden verse en la WebUI.
635
+
636
+
**Estadísticas rastreadas:**
637
+
-**total_processed**: Número de archivos procesados
638
+
-**too_small**: Archivos filtrados por estar debajo de `minimum_image_size`
639
+
-**too_long**: Archivos filtrados por exceder límites de duración (audio/video)
640
+
-**metadata_missing**: Archivos omitidos por falta de metadatos
641
+
-**not_found**: Archivos que no se pudieron localizar
642
+
-**already_exists**: Archivos ya en caché (no reprocesados)
643
+
-**other**: Archivos filtrados por otras razones
644
+
645
+
**Ver en la WebUI:**
646
+
647
+
Al navegar por datasets en el explorador de archivos de la WebUI, seleccionar un directorio con un dataset existente mostrará estadísticas de filtrado si están disponibles. Esto ayuda a diagnosticar por qué tu dataset puede tener menos muestras utilizables de lo esperado.
648
+
649
+
**Solución de problemas de archivos filtrados:**
650
+
651
+
Si muchos archivos están siendo filtrados como `too_small`:
652
+
1. Verifica tu configuración de `minimum_image_size` — debe coincidir con `resolution` y `resolution_type`
653
+
2. Para `resolution_type=pixel`, `minimum_image_size` es la longitud mínima del borde más corto
654
+
3. Para `resolution_type=area` o `pixel_area`, `minimum_image_size` es el área total mínima
655
+
656
+
Consulta la sección [Solución de Problemas](#solución-de-problemas-de-datasets-filtrados) a continuación para más detalles.
657
+
582
658
### `slider_strength`
583
659
584
660
-**Valores:** Cualquier valor float (positivo, negativo o cero)
-`--allow_dataset_oversubscription` के साथ: repeats स्वतः 1 पर सेट होंगे (25 × 2 = 50 samples)
553
553
554
+
### `max_num_samples`
555
+
556
+
-**विवरण:** Dataset को अधिकतम samples की संख्या तक सीमित करता है। सेट करने पर, पूर्ण dataset से निर्दिष्ट आकार का एक deterministic random subset चुना जाता है।
557
+
-**उपयोग का मामला:** बड़े regularization datasets के लिए उपयोगी जहाँ आप छोटे training sets को overwhelm न करने के लिए डेटा का केवल एक हिस्सा उपयोग करना चाहते हैं।
558
+
-**Deterministic selection:** Random selection dataset `id` को seed के रूप में उपयोग करता है, जिससे reproducibility के लिए training sessions में समान subset चुना जाना सुनिश्चित होता है।
559
+
-**डिफ़ॉल्ट:**`null` (कोई सीमा नहीं, सभी samples उपयोग होते हैं)
560
+
561
+
#### उदाहरण
562
+
```json
563
+
{
564
+
"id": "regularization-data",
565
+
"max_num_samples": 1000,
566
+
...
567
+
}
568
+
```
569
+
570
+
यह dataset से 1000 samples को deterministically select करेगा, जिसमें हर बार training चलाने पर समान selection उपयोग होगी।
571
+
554
572
### `start_epoch` / `start_step`
555
573
556
574
- यह schedule करता है कि dataset sampling कब शुरू होगी।
- जिन datasets की start condition कभी पूरी नहीं होती (उदा., `start_epoch``--num_train_epochs` से आगे), उन्हें skip किया जाएगा और model card में नोट किया जाएगा।
560
578
- जब scheduled datasets mid‑run में active होते हैं, तो progress‑bar step estimates approximate हो जाते हैं क्योंकि epoch length बढ़ सकती है।
561
579
580
+
### `end_epoch` / `end_step`
581
+
582
+
- यह schedule करता है कि dataset sampling कब **बंद** होगी (`start_epoch`/`start_step` का पूरक)।
583
+
-`end_epoch` (डिफ़ॉल्ट: `null` = कोई सीमा नहीं) इस epoch के बाद sampling बंद कर देता है; `end_step` (डिफ़ॉल्ट: `null` = कोई सीमा नहीं) इस optimizer step के बाद sampling बंद कर देता है।
584
+
- कोई भी condition समाप्त होने पर dataset बंद हो जाएगा; वे स्वतंत्र रूप से काम करते हैं।
585
+
-**Curriculum learning** workflows के लिए उपयोगी जहाँ आप चाहते हैं:
586
+
- पहले low-resolution data पर train करें, फिर high-resolution data पर switch करें।
587
+
- एक निश्चित बिंदु के बाद regularisation data को धीरे-धीरे हटाएं।
588
+
- एक single config file में multi-stage training बनाएं।
589
+
590
+
**उदाहरण: Curriculum Learning**
591
+
```json
592
+
[
593
+
{
594
+
"id": "lowres-512",
595
+
"type": "local",
596
+
"dataset_type": "image",
597
+
"instance_data_dir": "/data/512",
598
+
"end_step": 300
599
+
},
600
+
{
601
+
"id": "highres-1024",
602
+
"type": "local",
603
+
"dataset_type": "image",
604
+
"instance_data_dir": "/data/1024",
605
+
"start_step": 300
606
+
}
607
+
]
608
+
```
609
+
610
+
इस उदाहरण में, 512px dataset steps 1-300 के लिए उपयोग होता है, फिर 1024px dataset step 300 से आगे संभाल लेता है।
-**Warning:** यह destructive है और undo नहीं किया जा सकता। सावधानी से उपयोग करें।
580
630
-**Default:** trainer के `--delete_problematic_images` argument पर fallback करता है (डिफ़ॉल्ट: `false`)।
581
631
632
+
### Filtering Statistics देखना
633
+
634
+
जब SimpleTuner आपके dataset को process करता है, यह track करता है कि कितनी files filter हुईं और क्यों। ये statistics dataset के cache file (`aspect_ratio_bucket_indices_*.json`) में store होती हैं और WebUI में देखी जा सकती हैं।
635
+
636
+
**Track की जाने वाली Statistics:**
637
+
-**total_processed**: Process की गई files की संख्या
638
+
-**too_small**: `minimum_image_size` से नीचे होने के कारण filter की गई files
639
+
-**too_long**: duration limits से अधिक होने के कारण filter की गई files (audio/video)
640
+
-**metadata_missing**: missing metadata के कारण skip की गई files
641
+
-**not_found**: जो files locate नहीं हो सकीं
642
+
-**already_exists**: cache में पहले से मौजूद files (reprocess नहीं हुईं)
643
+
-**other**: अन्य कारणों से filter की गई files
644
+
645
+
**WebUI में देखना:**
646
+
647
+
WebUI file browser में datasets browse करते समय, किसी existing dataset वाली directory select करने पर filtering statistics दिखाई देंगी (यदि उपलब्ध हों)। यह diagnose करने में मदद करता है कि आपके dataset में expected से कम usable samples क्यों हैं।
648
+
649
+
**Filtered files का Troubleshooting:**
650
+
651
+
यदि बहुत सी files `too_small` के रूप में filter हो रही हैं:
652
+
1. अपनी `minimum_image_size` setting check करें — यह `resolution` और `resolution_type` से match होनी चाहिए
653
+
2.`resolution_type=pixel` के लिए, `minimum_image_size` minimum shorter edge length है
654
+
3.`resolution_type=area` या `pixel_area` के लिए, `minimum_image_size` minimum total area है
655
+
656
+
अधिक details के लिए नीचे [Troubleshooting](#filtered-datasets-का-troubleshooting) section देखें।
657
+
582
658
### `slider_strength`
583
659
584
660
-**Values:** कोई भी float मान (positive, negative, या zero)
0 commit comments