# \[RLLib\] Distinguishing hyperparameter tuning from single excution of RL algorithm

**URL:** https://discuss.ray.io/t/rllib-distinguishing-hyperparameter-tuning-from-single-excution-of-rl-algorithm/2211
**Category:** RLlib
**Created:** [May 19, 2021, 9:21pm UTC](https://discuss.ray.io/t/rllib-distinguishing-hyperparameter-tuning-from-single-excution-of-rl-algorithm/2211 "2021-05-19T21:21:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Saurabh\_Arora](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/saurabh_arora/32/1012_2.png) [@Saurabh\_Arora](https://discuss.ray.io/u/Saurabh_Arora)
#### Post date: [May 19, 2021, 9:21pm UTC](https://discuss.ray.io/t/rllib-distinguishing-hyperparameter-tuning-from-single-excution-of-rl-algorithm/2211/1 "2021-05-19T21:21:56Z")

</div>

Hi everyone,

I am trying to distinguish the commands for ‘hyperparameter tuning of a rllib algorithm’ from the commands for ‘one-time execution of same algorithm with a constant pre-defined values of needed hyperparameters’.  
The page [https://docs.ray.io/en/master/ray-overview/index.html#gentle-intro](https://docs.ray.io/en/master/ray-overview/index.html#gentle-intro)  
shows a PPO example that uses tune.run() without any hyperparameter space, and the page [https://docs.ray.io/en/master/tune/examples/pbt\_ppo\_example.html](https://docs.ray.io/en/master/tune/examples/pbt_ppo_example.html) shows a PPO example of using tune.run() with a hyperparameter space (and a scheduler).  
From this observation, I understand that same tune.run method can be used for both hyperparameter tuning and one-time RL training. If we provide hyperparameter search space and scheduler, it is tuning otherwise it is a single execution of RL algorithm. Please let me know whether my understanding is correct or not.

---

<div class="post-metadata">

### Author: ![RickLan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/ricklan/32/901_2.png) [@RickLan](https://discuss.ray.io/u/RickLan)
#### Post date: [May 20, 2021, 7:00am UTC](https://discuss.ray.io/t/rllib-distinguishing-hyperparameter-tuning-from-single-excution-of-rl-algorithm/2211/2 "2021-05-20T07:00:28Z")

</div>

@Saurabh_Arora Your understanding is correct. I’m not familiar with **PopulationBasedTraining**. But let’s assume there is a way to turn off hyperparam space for it. In your second link, if you use scalar values instead of **tune.choice** , this would turn off hyperparam space search and become just be a one-time RL training.

---

<div class="post-metadata">

### Author: ![Saurabh\_Arora](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/saurabh_arora/32/1012_2.png) [@Saurabh\_Arora](https://discuss.ray.io/u/Saurabh_Arora)
#### Post date: [May 20, 2021, 9:29am UTC](https://discuss.ray.io/t/rllib-distinguishing-hyperparameter-tuning-from-single-excution-of-rl-algorithm/2211/3 "2021-05-20T09:29:20Z")

</div>

Thanks, @RickLan . I have one more related question. I posted it here: [https://discuss.ray.io/t/rlllib-how-to-use-policy-learned-in-tune-run/2222](https://discuss.ray.io/t/rlllib-how-to-use-policy-learned-in-tune-run/2222)
