Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
tabular-ml【部署与运维】Build, evaluate, customize, troubleshoot, and deploy AutoGluon TabularPredictor workflows for supervised tabular machine learning.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill for supervised tabular classification, regression, and quantile prediction with autogluon.tabular.TabularPredictor and TabularDataset.
TabularPredictor, TabularDataset, leaderboard, feature importance, model management, save/load, or refit workflows.TimeSeriesPredictor: use ../time-series-forecasting/.MultiModalPredictor: use ../multimodal-automl/.references/troubleshooting.md.references/api-reference.md: constructor and method signatures, metrics, model management, save/load, and deployment-facing APIs.references/workflows.md: novice-to-expert fit/evaluate/predict workflows, quantile prediction, HPO, bagging, stacking, refit, distillation, and deployment cleanup.references/data-and-features.md: TabularDataset, schema expectations, feature metadata, automated feature generators, text columns, sample weights, and groups.references/customization.md: presets, hyperparameter dictionaries, custom metrics, custom models, resource controls, and optional model families.references/troubleshooting.md: actionable fixes for optional dependencies, schema drift, problem type errors, resource limits, HPO/Ray, save/load mismatch, and predictor path issues.scripts/tabular_smoke.py: trains a tiny in-memory TabularPredictor, evaluates it, predicts from a reloaded predictor, and prints a JSON summary.scripts/inspect_tabular_predictor.py: read-only environment/predictor inspection for versions, importability, optional packages, and saved predictor metadata checks.Run each script with --help first. The smoke script avoids network access and writes only to a temporary directory unless --output-dir is supplied.
from autogluon.tabular import TabularPredictor
predictor = TabularPredictor(label="target", eval_metric="accuracy").fit(
train_data,
presets="medium_quality",
time_limit=60,
hyperparameters={"GBM": {}, "RF": {"n_estimators": 50}},
num_cpus="auto",
num_gpus=0,
)
leaderboard = predictor.leaderboard(test_data, extra_info=True)
predictions = predictor.predict(test_data.drop(columns=["target"]))
Use an explicit path when the predictor must be preserved. Use a new empty path for every independent training run to avoid overwriting prior results.
presets="medium_quality" or a small explicit hyperparameters dictionary for smoke tests and CPU-constrained repros.presets="good_quality" or "high_quality" with a real time_limit for production candidates; reserve "best_quality" and "extreme_quality" for larger budgets."optimize_for_deployment" or call delete_models(dry_run=True) before destructive cleanup.require_version_match or require_py_version_match.