ml-hyperparameter-tuning
Use when the user asks about hyperparameter tuning with Optuna, Ray Tune or Hyperopt, search spaces, Bayesian/TPE vs random search, pruning, early stopping or…
от j4flmao★ 47 звёзд на GitHub
Установить ml-hyperparameter-tuning в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
ML Hyperparameter Tuning
Purpose
Design hyperparameter tuning pipelines with structured search spaces, optimal strategy selection, and production-ready framework configuration.
Architecture/Decision Trees
Strategy Selection Decision Tree
How long does each trial take?
├── <10 seconds
│ ├── <4 hyperparameters → Grid Search (exhaustive)
│ └── >4 hyperparameters → Random Search (better coverage)
├── 10 seconds - 1 minute
│ └── Bayesian Optimization (TPE or GP)
├── 1 minute - 1 hour
│ ├── Bayesian + ASHA Pruning (aggressive early stopping)
│ └── Hyperband (adaptive resource allocation)
└── >1 hour
├── Population-Based Training (evolve HP + weights)
└── Bayesian with aggressive pruning + checkpoint reuse
Search Space Scale Decision Tree
How many trials can you afford?
├── <20 trials → Manual tuning or grid on 2-3 key params
├── 20-100 trials → Random Search or Bayesian (TPE)
├── 100-1000 trials → Bayesian (GP/SMAC) + Median Pruner
├── 1000-10000 trials → Hyperband + Distributed (Ray)
└── >10000 trials → Population-Based Training
Parameter Scale Decision Tree
What type of hyperparameter?
├── Learning rate, regularization, weight decay
│ └── Log-uniform scale (trial.suggest_float(..., log=True))
├── Tree depth, number of layers, batch size, hidden units
│ └── Integer uniform (trial.suggest_int)
├── Optimizer, activation, pooling type
│ └── Categorical (trial.suggest_categorical)
└── Conditional (momentum only when optimizer==sgd)
└── if/else branching in objective function
Pruning Strategy Decision Tree
├── <10 trials budget → No pruning (too few to prune reliably)
├── 10-100 trials → MedianPruner (n_warmup_steps=10)
├── 100-1000 trials → ASHA (async, distributed-friendly)
└── >1000 trials → Hyperband (multi-bracket resource allocation)
Agent Protocol
Trigger
User request includes: hyperparameter tuning, Optuna, Ray Tune, Hyperopt, grid search, random search, Bayesian optimization, pruning, early stopping.
Input Context
Before activating, verify:
- Model type and training pipeline.
- Approximate training time per trial.
- Available compute resources (single machine, multi-core, multi-GPU, cluster).
- Which hyperparameters are known to matter.
- Whether cross-validation is needed inside each trial.
- Whether the objective function is deterministic or stochastic.
Output Artifact
Hyperparameter tuning setup with search space design, strategy selection, framework configuration, pruning policy, and distributed execution plan.
Response Format
## Tuning Config
### Search Space
Param: {name} | Type: {float/int/categorical} | Range: [{min}, {max}] | Scale: {linear/log}
### Strategy
Method: {grid / random / Bayesian / TPE / CMA-ES}
Budget: {N trials} | Parallel: {N workers} | Timeout: {duration}
### Framework
Tool: {Optuna / Ray Tune / Hyperopt}
Study: {name} | Direction: {minimize / maximize}
Metric: {metric_name} | Pruning: {none / median / Hyperband / ASHA}
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output.
Completion Criteria
- Search space defined with all tunable parameters, distributions, and scales.
- Search strategy selected based on trial budget and dimensionality.
- Tuning framework configured with study/trial lifecycle.
- Pruning policy set with minimum budget checks.
- Distributed execution configured with fault tolerance.
- Result persistence configured.
- Random seed set for reproducibility.
- Parameter importance analysis planned after tuning.
Workflow
Step 1: Search Space Definition
Use log-uniform for positive-valued parameters spanning orders of magnitude (learning rate 1e-5 to 1e-1, regularization 1e-4 to 1e-1). Use uniform for bounded additive parameters (depth 3-15, units 32-512). Use categorical for discrete options (optimizer, activation). Define conditional spaces where parameters depend on other choices.
import optuna
def create_search_space(trial, model_type="xgboost"):
if model_type == "xgboost":
return {
"n_estimators": trial.suggest_int("n_estimators", 50, 1000),
"max_depth": trial.suggest_int("max_depth", 3, 15),
"learning_rate": trial.suggest_float("learning_rate", 1e-3, 0.3, log=True),
"subsample": trial.suggest_float("subsample", 0.5, 1.0),
"colsample_bytree": trial.suggest_float("colsample_bytree", 0.3, 1.0),
"min_child_weight": trial.suggest_int("min_child_weight", 1, 10),
"reg_alpha": trial.suggest_float("reg_alpha", 1e-4, 10.0, log=True),
"reg_lambda": trial.suggest_float("reg_lambda", 1e-4, 10.0, log=True),
}
elif model_type == "neural_network":
n_layers = trial.suggest_int("n_layers", 1, 5)
params = {
"learning_rate": trial.suggest_float("learning_rate", 1e-5, 1e-1, log=Tr
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/automl-tuning.md
- references/hyperparameter-tuning-advanced.md
- references/hyperparameter-tuning-fundamentals.md
- references/multi-fidelity.md
- references/optimization-methods.md
- references/search-strategies.md
- references/tuning-at-scale.md
- references/tuning-frameworks.md
FAQ
Что делает скилл ml-hyperparameter-tuning?
Use when the user asks about hyperparameter tuning with Optuna, Ray Tune or Hyperopt, search spaces, Bayesian/TPE vs random search, pruning, early stopping or multi-objective tuning. Produces search space, sampler and pruner config and distributed execution plan. Not for evaluation protocol (use ml-model-evaluation) or NAS.
Как установить скилл ml-hyperparameter-tuning?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ml-hyperparameter-tuning запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
GitHubFind, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
build-evidence-map
GitHubBuild an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
pinecone-rag
GitHubBuild production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
qdrant-monitoring-debugging
GitHubDiagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…