executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
drift-monitoringDetect and interpret NannyML feature, output, target, and multivariate drift, then rank suspicious columns by alerts or performance correlation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task is about NannyML drift detection: univariate feature drift, model output drift, target distribution drift, multivariate PCA reconstruction-error drift, multivariate domain-classifier drift, or ranking drifted columns for follow-up investigation.
Route model performance estimation/calculation to the performance sub-skill, data-quality-only checks to the data-setup sub-skill, and YAML/CLI orchestration to the CLI sub-skill.
chi2 thresholds, one-method ranking requirements, not-fitted rankers, or domain-classifier runtime cost.filter, to_df, plot, distribution plots, and compare patterns.| Task | Use | Output |
|---|---|---|
| Detect per-feature distribution changes | nannyml.UnivariateDriftCalculator | One drift metric per selected method/column/chunk |
| Detect drift in prediction labels or scores | UnivariateDriftCalculator on y_pred and/or y_pred_proba | Output drift over chunks |
| Detect target distribution drift after labels arrive | UnivariateDriftCalculator on y_true | Target drift over chunks |
| Detect multivariate drift with a single less-explainable score | DataReconstructionDriftCalculator | reconstruction_error per chunk |
| Detect distribution separability between reference and chunks | DomainClassifierCalculator | domain_classifier_auroc per chunk |
| Prioritize drifted features by alert count | AlertCountRanker | Ranking DataFrame with number_of_alerts, column_name, rank |
| Prioritize drifted features by correlation with performance change | CorrelationRanker | Ranking DataFrame with Pearson correlation and drift flags |
import nannyml as nml
reference, analysis, _ = nml.load_synthetic_car_loan_dataset()
features = ['car_value', 'salary_range', 'debt_to_income_ratio', 'loan_length', 'repaid_loan_on_prev_car', 'size_of_downpayment', 'driver_tenure']
calculator = nml.UnivariateDriftCalculator(
column_names=features,
timestamp_column_name='timestamp',
continuous_methods=['jensen_shannon', 'wasserstein'],
categorical_methods=['jensen_shannon', 'l_infinity'],
chunk_size=5000,
)
result = calculator.fit(reference).calculate(analysis)
print(result.filter(period='analysis', methods=['jensen_shannon']).to_df(multilevel=False).head())
import nannyml as nml
reference, analysis, _ = nml.load_synthetic_car_loan_dataset()
features = ['car_value', 'salary_range', 'debt_to_income_ratio', 'loan_length', 'repaid_loan_on_prev_car', 'size_of_downpayment', 'driver_tenure']
pca_drift = nml.DataReconstructionDriftCalculator(
column_names=features,
timestamp_column_name='timestamp',
chunk_size=5000,
).fit(reference).calculate(analysis)
print(pca_drift.filter(period='analysis').to_df(multilevel=False).head())
Filter univariate results to one method per feature before ranking.
ranker = nml.AlertCountRanker()
ranking = ranker.rank(result.filter(period='analysis', methods=['jensen_shannon']), only_drifting=True)
print(ranking.head())
For correlation ranking, use one performance metric and one drift method:
correlation_ranker = nml.CorrelationRanker()
correlation_ranker.fit(estimated_performance.filter(period='reference', metrics=['roc_auc']))
ranking = correlation_ranker.rank(
result.filter(period='analysis', methods=['jensen_shannon']),
estimated_performance.filter(period='analysis', metrics=['roc_auc']),
)
treat_as_categorical / treat_as_numerical to override pandas dtype inference when feature semantics are known.