Error in import HyperOptSearch

Hi!
I would try to use HyperOptSearch to tune my experiment, but VSCode don’t find the class when I write from ray.tune.search.hyperopt import HyperOptSearch in my python programm.

Any suggestion how to fix it?

Best!

@hermmanhender
There has been some recent refactoring [PR], that I suspect is related to what you are experiencing?
May I ask which version of Ray are you using?
Could that be your VSCode needs to re-index the files?

Thanks for your response @xwjiang2010 . Yes, I think that must be the problem. I’m using Ray 1.13 and I checked the files and I have the “suggest” folder instead of “search”. How should I do to update the directory? I reinstalled Ray, but it didn’t fix it. Thank you!

Got it.
Since you are still using 1.13, it is expected - the change was not in 1.13 and is only on master.
You can either

  1. use 1.13 and import suggest.xxx, or
  2. install nightly ray instead and use search.xxx.

See instructions on installing nightly ray: Installing Ray — Ray 1.13.0

2 Likes

This was the solution, the right solution, I had to update Ray, by doing this: pip install -U ray and after that I restarted VSCode and it was working. Thanks a lot for your help.

1 Like