mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 18:36:39 +00:00
Refactor constants management to use Pydantic BaseModel for configuration
- Replaced module-level path variables in constants.py with a structured Pydantic Config class. - Updated all relevant modules (train.py, augmentation.py, exports.py, dataset-visualiser.py, manual_run.py) to access paths through the new config structure. - Fixed bugs related to image processing and model saving. - Enhanced test infrastructure to accommodate the new configuration approach. This refactor improves code maintainability and clarity by centralizing configuration management.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# Module: manual_run
|
||||
|
||||
## Purpose
|
||||
Ad-hoc script for manual training operations. Contains commented-out alternatives and a hardcoded workflow for copying model weights and exporting.
|
||||
|
||||
## Public Interface
|
||||
No functions or classes. Script-level code only.
|
||||
|
||||
## Internal Logic
|
||||
- Contains commented-out calls to `Augmentator().augment_annotations()`, `train.train_dataset()`, `train.resume_training()`.
|
||||
- Active code: references a specific model date (`2025-05-18`), removes intermediate epoch checkpoint files, copies `best.pt` to `CURRENT_PT_MODEL`, then calls `train.export_current_model()`.
|
||||
- Serves as a developer convenience script for one-off training/export operations.
|
||||
|
||||
## Dependencies
|
||||
- `constants` — models_dir, prefix, CURRENT_PT_MODEL
|
||||
- `train` — export_current_model
|
||||
- `augmentation` — Augmentator (imported, usage commented out)
|
||||
- `glob`, `os`, `shutil` (stdlib)
|
||||
|
||||
## Consumers
|
||||
None (standalone script).
|
||||
|
||||
## Data Models
|
||||
None.
|
||||
|
||||
## Configuration
|
||||
Hardcoded model date: `2025-05-18`.
|
||||
|
||||
## External Integrations
|
||||
Filesystem operations on `/azaion/models/`.
|
||||
|
||||
## Security
|
||||
None.
|
||||
|
||||
## Tests
|
||||
None.
|
||||
Reference in New Issue
Block a user