Generate a comprehensive model evaluation report by following these steps:
Locate artifacts in the directory specified by $ARGUMENTS (default:
output/). Readevaluation_report.mdif it exists to gather existing metrics.Load the trained model (look for
.joblibor.pklfiles) and extract:- Model type and hyperparameters
- Feature names and count
- Feature importance scores (if the model supports them)
Load test data (look for
x_test.parquetandy_test.parquet) and compute:- Prediction distribution statistics
- Error distribution statistics
- Any metrics not already in the evaluation report
Fill in the report template from templates/report_template.md. Replace each placeholder section with actual data:
- Executive Summary: 2-3 sentence overview of model performance
- Dataset Overview: number of samples, features, target variable description
- Model Configuration: model type, all hyperparameters in a table
- Performance Metrics: all computed metrics in a table
- Feature Importance: top 5 features ranked by importance with scores
- Recommendations: at least 3 actionable suggestions for improvement
Save the completed report to
output/full_report.md.Save the report generation code as a standalone Python script.
- Collect all the code used in steps 1-5 into a single
.pyfile. - The script should be runnable independently (include all imports, logging config, and a
main()function). - Ask the user where they would like to save the script (suggest a default like
scripts/generate_report.py).
- Collect all the code used in steps 1-5 into a single
Log a summary of what was generated using the project's logging format.
Follow the coding standards in CLAUDE.md. Use polars for any data loading.