Override `num_samples` when restoring model

How severe does this issue affect your experience of using Ray?

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

Hi,

I am currently trying to finetune a model using Ray Tune and Optuna. Let’s say I have run an experiment of 10 runs that gave me an overview of what good hyperparameters but not good enough parameters. Is there a way to restore this experiment but increasing num_samples so that it keeps on looking for good hyperparameters but keeping the knowledge of the previous runs so that it does not lose this previous knowledge.

Does anyone has an idea how to do it? Thanks a lot

Hi @aRI0U,

  1. Here’s how you can restore a search algorithm and pass it into a new Tune experiment with more samples: [Tune] Scope of `Tuner.restore()` functionality is unclear in docs · Issue #30223 · ray-project/ray · GitHub. Currently, creating a new experiment is the only way to generate new samples - restoration is meant only for resuming an interrupted experiment and finishing the exact hyperparameter optimization job that was originally specified.

  2. It’s also possible to take hyperparameters from a previous experiment as the starting point for a new one, by specifying points_to_evaluate. See this guide for an example: Running Tune experiments with Optuna — Ray 2.1.0

First solution you proposed is exactly what I was looking for, thanks!