Conversation
- Introduced `augmentation.py` for offline data augmentation using a unified catalog, ensuring consistency across TensorFlow and PyTorch pipelines. - Implemented `balancing.py` to handle class imbalance in training datasets, supporting oversampling, undersampling, and hybrid strategies. - Enhanced `base.py` to include a granular augmentation configuration, allowing customizable preprocessing workflows.
… and PyTorch - Implemented idempotent augmentation pipelines using a normalized catalog for TensorFlow and PyTorch. - Moved augmentation layers out of models into the data pipeline (`tf.data` and `torchvision.transforms`), preserving clean model artifacts for deployment. - Added advanced augmentation techniques including geometric, color, and noise transformations, ensuring parity across frameworks.
…ing configurations - Introduced Transfer Learning with pre-trained backbones (EfficientNet, MobileNet, ResNet) configurable via architecture flag. - Added two-phase training: Feature Extraction (frozen base) and Fine-Tuning (unfreezing layers) with distinct LR, epochs, and dropout. - Implemented dynamic input size adjustments for TL (e.g., enforcing 224px) to ensure memory efficiency. - Enhanced ingestion pipeline with `max_images` to cap dataset sizes based on container constraints. - Persisted training metadata (`model_meta.json`) for adaptive input handling by model-service. - Streamlined data augmentation and preprocessing across all pipelines.
…nsorFlow and PyTorch - Added generation of Score-CAM galleries after training to visualize model focus areas on test samples. - Implemented framework-specific Score-CAM logic, ensuring parity between TensorFlow and PyTorch backends. - Updated `TrainingResult` to include `interpretability_path` indicating the generated gallery location. - Extended the executor to log Score-CAM galleries as MLflow artifacts for tracing and inspection. - Enhanced both TensorFlow and PyTorch training strategies to support `class_names` for interpretability rendering.
…ntation catalog, and transfer learning enhancements - Implemented weights precaching for TensorFlow and PyTorch backbones (EfficientNet, MobileNet, ResNet) during build to enable offline Transfer Learning in lab environments. - Added granular data augmentation catalog with customizable techniques and parameters, integrated across frontend and backend configurations. - Enhanced training configuration to support advanced Transfer Learning workflows, including two-phase training (Feature Extraction and Fine-Tuning) with separate epochs, learning rates, and layer freezing options. - Extended frontend `NodeConfig` to expose detailed augmentation and class balancing setups, adapting to both CNN and pretrained architectures.
…-time validation
- Added grouping of metrics by split (Train/Val/Test/Drift) with semantic coloring and logical ordering.
- Integrated real-time validation for configuration panels with field-level error handling and contextual feedback.
- Introduced support for dual-monitoring ("val_loss" and "val_accuracy") in early stopping across TensorFlow and PyTorch.
- Enhanced notification dropdown with click-outside and escape-to-close behavior for improved UX.
- Updated test configurations and request DTO to support extended model training properties.
…nd and UI integration - Added a multi-phase onboarding flow (`welcome`, `tour`, `done`) for new users, supported by backend persistence and frontend store. - Introduced `WelcomeModal` and `CanvasTour` components to guide users through workspace creation and pipeline building. - Added `/me/onboarding` endpoint to manage user onboarding state. - Enhanced database schema with `onboarding_completed` column for tracking user progress. - Optimized ingestion pipeline memory usage using preallocated arrays to improve RAM efficiency.
…-CAM support, and enhance error handling - Updated `requirements-gpu.txt` to explicitly pin `torch` and `torchvision` versions with CUDA (`+cu121`) to prevent CPU-only installs. - Added `scorecam` field to MLflow API response for visualizing interpretability data in model details. - Introduced `ServerWebInputException` handling in global exception handler to improve client error reporting (`400 Bad Request`) for malformed requests. - Implemented Score-CAM embedding in model summaries, including base64-encoded galleries for frontend display. - Enhanced MLflow artifact handling with a method to fetch and encode Score-CAM galleries as base64 `data:image/png`.
…ation pipelines - Unified dataset preprocessing to maintain uint8 format (0-255) where possible, casting to float32 (0-1) on demand during training. - Reduced memory usage in ingestion pipeline and training workflows by leveraging dtype-specific preprocessing. - Enhanced normalization strategies (`minmax`, `rescale`, `zscore`) to dynamically adjust based on dataset dtype. - Improved data drift and overfitting warnings to align with severity levels for consistent reporting in UI and logs. - Updated TensorFlow and PyTorch pipelines for on-the-fly data casting and inference efficiency. - Increased MLflow artifact handling buffer to 32MB, resolving errors with large artifact retrieval.
…ines for CPU/GPU builds** - Split `requirements.txt` into focused files: `requirements-core.txt`, `requirements-frameworks.txt` (CPU), and `requirements-frameworks-gpu.txt` for better modularity. - Introduced BuildKit cache mounts in Dockerfile to speed up builds by caching dependency wheels. - Enhanced Dockerfile layering to separate ML frameworks (stable, heavy) from app dependencies (volatile, light), reducing rebuild overhead. - Updated augmentation and balancing pipelines to preserve input dtype (uint8/float) and optimize memory usage. - Added block-wise feature extraction in drift computation to avoid OOM errors on large datasets. - Improved `.dockerignore` to exclude volatile local folders (e.g., `mlruns`, `storage-dev`), minimizing image bloat.
… handling, and GPU performance** - Increased WebFlux codec buffer to 20MB to resolve memory limits on large @RequestBody payloads. - Fixed `numpy>=1.26,<2` for TensorFlow/PyTorch compatibility and reproducible builds. - Pinned GPU framework versions (`torch`, `torchvision`, `TensorFlow`) to ensure CUDA compatibility (`+cu121`). - Added dangling image cleanup to prevent disk bloat after Docker builds. - Enhanced UI validation: error scrolling, toast notifications, and real-time field feedback for config panels. - Introduced pipeline replay safeguards to prevent inconsistent node statuses on completed executions.
…el deployment, and GPU resource optimization - Updated motion variants `motion-safe`/`motion-reduce` to animate always, overriding OS preferences, and removed `@media (prefers-reduced-motion)` block. - Enhanced model deployment pipeline in frontend with real-time deployment status checks and integration into "Deployments" module. - Improved GPU memory management by enabling `cuda_malloc_async` in TensorFlow to release VRAM between runs. - Refactored dataset split detection using token-based classification with support for varied naming patterns (e.g., `Train_Set`, `test-data`). - Adjusted PyTorch and TensorFlow versions in model-service to ensure artifact compatibility with ml-engine output. - Implemented Score-CAM interpretability as MLflow artifact with UI enhancements for better user feedback on training and deployment workflows.
…PU memory handling - Enforced `motion-safe`/`motion-reduce` variants to animate regardless of OS preferences, removing `@media (prefers-reduced-motion)`. - Added real-time deployment status monitoring and integration into "Deployments" frontend module. - Enabled `cuda_malloc_async` in TensorFlow to optimize VRAM clearing between runs. - Improved split detection with token-based classifiers, supporting varied dataset naming conventions. - Updated framework versions to ensure artifact compatibility. - Integrated Score-CAM interpretability into MLflow with enhanced UI feedback for training and deployments.
…ndency review - Documented rationale for exception related to `torch.load` RCE vulnerability. - Ensured no exposure due to reliance on `torch.jit.load` for trusted TorchScript artifacts. - Included planned review upon future CUDA stack migration.
|
Revisado, adicionalmente se espera visto bueno de @Santalb @ErnestoSCL |
|
Se ha completado la auditoría técnica, las pruebas de regresión y la verificación de infraestructura sobre el Pull Request #37 ("Release 3: Transfer Learning, optimización de recursos y hardening del ML Engine"). Las modificaciones cierran exitosamente el Sprint 3 ("Mejoras"), garantizando la estabilidad del ciclo de vida de los modelos y la resiliencia del sistema operativo. Matriz de Verificación y Estado de Pruebas
Detalles de los Bloques Auditados1. Arquitectura de Machine Learning e Interpretabilidad (#35, #33, #34)
2. Gestión de Recursos y Hardening del Motor (Crítico)
3. Conectividad, API y Experiencia de Usuario (#30, #32)
Resultados del Pipeline de Verificación AutomatizadaLos criterios de aceptación automáticos se ejecutaron y concluyeron con éxito en el entorno integrado:
Dictamen Final
Estado del Pull Request: APROBADOEl código introducido en la rama |
Release 3 — Mejoras de ML, rendimiento y robustez
Cierra la iniciativa "Mejoras" (Sprint 3): arquitecturas preentrenadas con Transfer
Learning, preprocesamiento avanzado, interpretabilidad y una optimización integral de
recursos del
ml-engine, además de endurecimiento del despliegue y correcciones de UX.Entrenamiento y arquitecturas
Fine-Tuning (descongela N capas, LR ~100× menor). Hiperparámetros por fase configurables.
embeddings en Feature Extraction (el backbone se ejecuta una sola vez).
Stopping dual (val_loss/val_accuracy).
Preprocesamiento
Métricas e interpretabilidad
por split con color.
Optimización de recursos (crítico)
cap por memoria disponible y aviso de huella estimada antes de entrenar.
cuda_malloc_async+ipc_collectpara liberar entre runs.ml-engineen 2 capas (no re-descarga TF/PyTorch) y pinningreproducible de dependencias (numpy<2, TF 2.15.1, torch 2.3.1+cu121, nvcc para libdevice).
Despliegue
colgantes → fin de las imágenes
<none>acumuladas..keras).Robustez / bugfixes
/predict413 (buffer WebFlux 20 MB);nodo de entrenamiento colgado en RUNNING al volver; detección de splits tolerante
(
Train_Set_Folderya no se toma como clase); PSI consistente nodo/detalle.UX/UI
siempre activas, validación por campo en los nodos.
Docs
README.mdactualizado (arquitecturas, TL, augmentation, Score-CAM, optimización) ynuevo
docs/evidencias.md(evidencias por ticket).