How yukun-guo/modelgardener works
ModelGardener turns YAML-defined ML projects into configured workflows for data preparation, training, evaluation, prediction, and deployment. The principal CLI path loads project configuration, constructs an EnhancedTrainer, and dispatches training or inference; script generation is a parallel capability for producing standalone workflow scripts. Data loaders and preprocessing feed model execution, while trained models and reports are persisted as artifacts. The README documents interactive project/configuration management, preview, auto-discovery, and multi-format deployment; those capabilities are represented at their documented subsystem paths. Detailed wiring for unsampled modules is not inferred.
Main entry points: enhanced_trainer.py Training and inference · modelgardener_cli.py CLI workflows · script_generator.py Model deployment · cli.py Command-line interface
Components 20
CLI and Projects
- Command-line interface
src/modelgardener/cli.py - CLI workflows
src/modelgardener/modelgardener_cli.py - Configuration management
src/modelgardener/config_manager.py - Project setup
src/modelgardener/helper_funcs.py - Script generation
src/modelgardener/script_generator.py - Custom function loading
src/modelgardener/custom_functions_loader.py
Data Preparation
- Dataset loading
src/modelgardener/scalable_dataset_loader.py - Preprocessing pipeline
src/modelgardener/preprocessing_pipeline.py - Data preview
src/modelgardener/modelgardener_cli.py
Model Workflows
- Training components
src/modelgardener/training_components_builder.py - Model construction
src/modelgardener/enhanced_model_builder.py - Training and inference
src/modelgardener/enhanced_trainer.py - Runtime configuration
src/modelgardener/runtime_configurator.py - Training callbacks
src/modelgardener/bridge_callback.py
Artifacts and Deployment
- Saved model files
- Evaluation and prediction reports
- Model deployment
src/modelgardener/script_generator.py
Other components
- ML practitioner
- Project datasets
- Deployment formats
Connections 20
- ML practitioner → Command-line interface: runs commands
- Command-line interface → CLI workflows: dispatches
- CLI workflows → Configuration management: loads configuration
- CLI workflows → Project setup: creates projects
- CLI workflows → Script generation: generates scripts
- CLI workflows → Custom function loading: loads extensions
- CLI workflows → Training and inference: runs workflows
- CLI workflows → Data preview: previews samples
- Project datasets → Dataset loading: provides data
- Dataset loading → Preprocessing pipeline: prepares samples
- Preprocessing pipeline → Training and inference: supplies processed data
- Training and inference → Training components: assembles training
- Training and inference → Model construction: builds models
- Training and inference → Runtime configuration: configures execution
- Training and inference → Training callbacks: uses callbacks
- Training and inference → Saved model files: saves models
- Training and inference → Evaluation and prediction reports: writes results
- Script generation → Model deployment: generates deployment script
- Model deployment → Deployment formats: converts and serves
- Saved model files → Model deployment: loads model