ray.tune.Tuner.fit#
- Tuner.fit() ResultGrid [source]#
Executes hyperparameter tuning job as configured and returns result.
Failure handling: For the kind of exception that happens during the execution of a trial, one may inspect it together with stacktrace through the returned result grid. See
ResultGrid
for reference. Each trial may fail up to a certain number. This is configured byRunConfig.FailureConfig.max_failures
.Exception that happens beyond trials will be thrown by this method as well. In such cases, there will be instruction like the following printed out at the end of console output to inform users on how to resume.
Please use
Tuner.restore
to resume.import os from ray.tune import Tuner trainable = ... tuner = Tuner.restore( os.path.expanduser("~/ray_results/tuner_resume"), trainable=trainable ) tuner.fit()
- Raises:
RayTaskError – If user-provided trainable raises an exception