技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
train-tune【数据与研究】Use Ray Train and Ray Tune for distributed training, checkpointing, hyperparameter tuning, resources, and result analysis.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task mentions ray.train, ScalingConfig, RunConfig, CheckpointConfig, train.report, ray.tune.Tuner, TuneConfig, tune.report, search spaces, schedulers, with_resources, ResultGrid, max_concurrent_trials, or storage_path.
max_concurrent_trials so inner Train workers can acquire resources.../data-pipelines/SKILL.md, Ray Core placement/resource semantics to ../core-runtime/SKILL.md, trained artifact serving to ../serve-deployments/SKILL.md, and RLlib AlgorithmConfig work to ../rllib-workloads/SKILL.md.from ray import tune
def objective(config):
score = (config["width"] - 3) ** 2
tune.report({"loss": score})
results = tune.Tuner(
tune.with_resources(objective, {"cpu": 1, "gpu": 0}),
param_space={"width": tune.grid_search([2, 3, 4])},
tune_config=tune.TuneConfig(metric="loss", mode="min"),
run_config=tune.RunConfig(name="small_sweep", storage_path="./ray_results"),
).fit()
print(results.get_best_result().config)
references/api-reference.md for verified signatures and how Train/Tune objects relate.references/workflows.md for checkpoint/storage recipes, Tune sweeps, scheduler/resource examples, ResultGrid analysis, and Train+Tune integration.references/troubleshooting.md for missing extras, storage mistakes, metric/mode mismatches, resource deadlocks, GPU visibility, checkpoint/report misuse, and output locations.python scripts/tune_train_smoke.py --help for a safe helper. Add --run-tune only when starting a tiny local Ray Tune run is acceptable.ray[train] for Train workloads and ray[tune] for Tune workloads. Add framework extras or packages only for the selected trainer/search algorithm.>=3.10.ray[all] by default; it can install unnecessary dependencies for unrelated Ray libraries.