scikit-learn Template
The scikit-learn template scaffolds a production-ready ML project with scikit-learn, pandas, and traditional ML algorithms. Two variants are available:sklearn: basic model templatesklearn-pipeline: full preprocessing + model pipeline
Quick Start
cirron init.
Project Structure
Dockerfile, .gitignore, README.md, .env.example, tests), see Common files.
Cirron-specific bits
cirron.yaml
Profiling hooks
The generatedtrain.py and inference.py integrate with the Cirron SDK. Call ci.profile() once at module top, then wrap the estimator with ci.wrap() to record fit, predict, and pipeline-step spans:
requirements.txt
Model Types
- Classification: defaults to
RandomForestClassifier(n_estimators=100, max_depth=10). Metrics: accuracy, precision, recall, F1. - Regression: defaults to
RandomForestRegressor(n_estimators=100, max_depth=10). Metrics: MSE, R².
src/model.py:
Model Persistence
The generatedtrain.py saves both the model and the fitted preprocessor together via joblib:
inference.py reloads both so prediction-time preprocessing matches training.
Usage
Hyperparameter Tuning
Wrapcreate_model() with GridSearchCV for sweep-based tuning:
Next Steps
PyTorch Template
Deep learning framework
TensorFlow Template
Alternative deep learning framework
Common files
Dockerfile, tests, and shared scaffolding
Deployment
Deploy your trained model