Examples¶
Tip
Check out the Tune User Guides To learn more about Tune’s features in depth.
Practical How-To Guides¶
Ray Tune integrates with many popular machine learning frameworks. Here you find a few practical examples showing you how to tune your models. At the end of these guides you will often find links to even more examples.













Search Algorithm Examples¶
AX Example: Example script showing usage of AxSearch [Ax website]
Dragonfly Example: Example script showing usage of DragonflySearch [Dragonfly website]
SkOpt Example: Example script showing usage of SkoptSearch [Scikit-Optimize website]
Running Tune experiments with HyperOpt: Example script showing usage of HyperOptSearch [HyperOpt website]
Hyperopt Conditional Search Space Example: Example script showing usage of HyperOptSearch [HyperOpt website] with a conditional search space
BayesOpt Example: Example script showing usage of BayesOptSearch [BayesianOptimization website]
Blendsearch Example: Example script showing usage of BlendSearch [BlendSearch website]
CFO Example: Example script showing usage of CFO [CFO website]
BOHB Example: Example script showing usage of TuneBOHB [BOHB website]
Nevergrad Example: Example script showing usage of NevergradSearch [Nevergrad website]
Optuna Example: Example script showing usage of OptunaSearch [Optuna website]
Optuna Define-By-Run Example: Example script showing usage of OptunaSearch [Optuna website] with a define-by-run function
Optuna Multi-Objective Example: Example script showing usage of OptunaSearch [Optuna website] for multi-objective optimization
ZOOpt Example: Example script showing usage of ZOOptSearch [ZOOpt website]
SigOpt Example: Example script showing usage of SigOptSearch [SigOpt website]
HEBO Example: Example script showing usage of HEBOSearch [HEBO website]
SigOpt Multi-Objective Example: Example using Sigopt’s multi-objective functionality (contributed).
SigOpt Prior Belief Example: Example using Sigopt’s support for prior beliefs (contributed).
Other Examples¶
tune_basic_example: Simple example for doing a basic random and grid search.
Asynchronous HyperBand Example: Example of using a simple tuning function with AsyncHyperBandScheduler.
HyperBand Function Example: Example of using a Trainable function with HyperBandScheduler. Also uses the AsyncHyperBandScheduler.
PBT Function Example: Example of using the function API with a PopulationBasedTraining scheduler.
PB2 Example: Example of using the Population-based Bandits (PB2) scheduler.
Logging Example: Example of custom loggers and custom trial directory naming.
Genetic Search Example: Optimizing the michalewicz function using the contributed GeneticSearch algorithm with AsyncHyperBandScheduler.
Exercises¶
Learn how to use Tune in your browser with the following Colab-based exercises.
Tutorial source files can be found here.