How giovanasantiagolima/welding-optuna-pytorch works
This repository is a welding-parameter prediction system: it prepares welding records and trains a PyTorch multi-output regressor for voltage, amperage, and welding speed. The documented workflow reshapes raw records by weld pass, cleans them, encodes features into tensors, then tunes and trains models with cross-validation before exporting ONNX. The graph preserves the README’s embedding, weighted-loss, and metric capabilities. Some preprocessing and export relationships are documented rather than fully visible in the excerpts; the separate src/treinamento.py implementation is not shown as part of the documented pipeline.
Main entry points: train.py Training and validation · tuning.py Optuna search · load_data.py Pass restructuring · preprocess_data.py Cleaning and features
Components 11
Data preparation
- Pass restructuring
src/data_prep/load_data.py - Cleaning and features
src/data_prep/preprocess_data.py - Feature encoding
src/data_prep/preprocess_encoder.py
Model training
- Tensor dataset
src/ml_model/dataset.py - Embedding regressor
src/ml_model/model.py - Training and validation
src/ml_model/train.py
Optimization and export
- Optuna search
src/ml_model/tuning.py - Best-trial metrics
src/ml_model/tuning.py - ONNX model
src/ml_model/train.py
Standalone implementation
- Standalone training
src/treinamento.py
Other components
- Welding CSV
Connections 10
- Welding CSV → Pass restructuring: loads and reshapes
src/data_prep/load_data.py - Pass restructuring → Cleaning and features: feeds cleaned records
README.md - Cleaning and features → Feature encoding: feeds encoding
README.md - Feature encoding → Tensor dataset: saves tensors
src/data_prep/preprocess_encoder.py - Training and validation → Tensor dataset: loads batches
src/ml_model/train.py - Training and validation → Embedding regressor: trains model
src/ml_model/train.py - Optuna search → Training and validation: runs cross-validation
src/ml_model/tuning.py - Optuna search → Training and validation: re-trains best trial
src/ml_model/tuning.py - Optuna search → Best-trial metrics: saves metrics
src/ml_model/tuning.py - Training and validation → ONNX model: exports model
README.md