# Using Optuna hyperparameter importance on Ray Tune experiment with Optuna as search algorithm

**URL:** <https://discuss.ray.io/t/using-optuna-hyperparameter-importance-on-ray-tune-experiment-with-optuna-as-search-algorithm/6395>\
**Category:** Ray Tune\
**Created:** [June 5, 2022, 4:38am UTC](https://discuss.ray.io/t/using-optuna-hyperparameter-importance-on-ray-tune-experiment-with-optuna-as-search-algorithm/6395 "2022-06-05T04:38:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephano41](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/stephano41/32/2673_2.png) [@stephano41](https://discuss.ray.io/u/stephano41)\
**Post date:** [June 5, 2022, 4:38am UTC](https://discuss.ray.io/t/using-optuna-hyperparameter-importance-on-ray-tune-experiment-with-optuna-as-search-algorithm/6395/1 "2022-06-05T04:38:41Z")

</div>

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

- None: Just asking a question out of curiosity

Optuna has a handy function `[optuna.importance.get_param_importances](https://optuna.readthedocs.io/en/v1.3.0/reference/importance.html)` that can be used on an optuna.study object.

I was wondering how one may go about using this function on a Ray Tune experiment where the search algorithm is optuna, so that I can get which parameters were considered important by optuna?

---

<div class="post-metadata">

**Author:** ![amogkam](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/amogkam/32/17_2.png) [@amogkam](https://discuss.ray.io/u/amogkam)\
**Post date:** [June 6, 2022, 9:54pm UTC](https://discuss.ray.io/t/using-optuna-hyperparameter-importance-on-ray-tune-experiment-with-optuna-as-search-algorithm/6395/2 "2022-06-06T21:54:43Z")

</div>

Hey @stephano41, ah I don’t think we have something like this for Ray Tune.

The optuna study is saved as a private attribute in the `OptunaSearcher`, so a hacky way to do this would be to pass in `optuna_search._ot_study` into `get_param_importances`.

But let me create a Github issue to track this feature. [[Tune] Support for Optuna `get_param_importances` or equivalent · Issue #25522 · ray-project/ray · GitHub](https://github.com/ray-project/ray/issues/25522).
