ray.tune.run_experiments#
- ray.tune.run_experiments(experiments: Experiment | Mapping | Sequence[Experiment | Mapping], scheduler: TrialScheduler | None = None, verbose: int | AirVerbosity | Verbosity | None = None, progress_reporter: ProgressReporter | None = None, resume: bool | str | None = None, resume_config: ResumeConfig | None = None, reuse_actors: bool = False, raise_on_failed_trial: bool = True, concurrent: bool = True, callbacks: Sequence[Callback] | None = None, _remote: bool | None = None)[源代码]#
运行并阻塞,直到所有试验完成。
示例
>>> from ray.tune.experiment import Experiment >>> from ray.tune.tune import run_experiments >>> def my_func(config): return {"score": 0} >>> experiment_spec = Experiment("experiment", my_func) >>> run_experiments(experiments=experiment_spec) >>> experiment_spec = {"experiment": {"run": my_func}} >>> run_experiments(experiments=experiment_spec)
- 返回:
试验对象列表,保存每个执行试验的数据。