# Get Optuna study from hyperparameter-search in Trainer?

**URL:** <https://discuss.huggingface.co/t/get-optuna-study-from-hyperparameter-search-in-trainer/4784>\
**Category:** Beginners\
**Created:** [March 20, 2021, 11:30am UTC](https://discuss.huggingface.co/t/get-optuna-study-from-hyperparameter-search-in-trainer/4784 "2021-03-20T11:30:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![petterol](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@petterol](https://discuss.huggingface.co/u/petterol)\
**Post date:** [March 20, 2021, 11:30am UTC](https://discuss.huggingface.co/t/get-optuna-study-from-hyperparameter-search-in-trainer/4784/1 "2021-03-20T11:30:07Z")

</div>

Hi there,

I use hyperparameter-search in Trainer with Optuna and wanted to know if there is an easy option to access the study itself. From what I’ve read in the implementation, only the BestRun is returned by run\_hp\_search\_optuna() and not the study itself.  
(I’m asking because I wanted to try out the plot functions of Optuna that work on the study)

---

<div class="post-metadata">

**Author:** ![yc1999](https://avatars.discourse-cdn.com/v4/letter/y/df705f/32.png) [@yc1999](https://discuss.huggingface.co/u/yc1999)\
**Post date:** [July 14, 2021, 2:39am UTC](https://discuss.huggingface.co/t/get-optuna-study-from-hyperparameter-search-in-trainer/4784/2 "2021-07-14T02:39:12Z")

</div>

Hello, I have this confusion too. Have you solved this problem? After some trying, I find this page is helpful——[Saving/Resuming Study with RDB Backend](https://optuna.readthedocs.io/en/stable/tutorial/20_recipes/001_rdb.html). 😀
