[Bug] BasicVariantGenerator not compatible with Repeater
See original GitHub issueSearch before asking
- I searched the issues and found no similar issues.
Ray Component
Ray Tune
What happened + What you expected to happen
I would like to repeat configurations sampled from a random search multiple times. I tried doing this using BasicVariantGenerator
in combination with Repeater
, e.g.
from ray.tune.suggest import Repeater
from ray.tune.suggest.basic_variant import BasicVariantGenerator
search_alg = Repeater(BasicVariantGenerator(), repeat=10)
# tune.run(trainable, num_samples=20, search_alg=search_alg)
This fails with the error message:
Traceback (most recent call last):
File "/lib/python3.9/site-packages/ray/tune/suggest/repeater.py", line 122, in __init__
metric=self.searcher.metric, mode=self.searcher.mode)
AttributeError: 'BasicVariantGenerator' object has no attribute 'mode'
As far as I understand, this happens because Repeater expects a Searcher
and not a SearchAlgorithm
but the former does not exist for a random search.
Versions / Dependencies
ray 1.7.0
Reproduction script
from ray.tune.suggest import Repeater
from ray.tune.suggest.basic_variant import BasicVariantGenerator
search_alg = Repeater(BasicVariantGenerator(), repeat=10)
# tune.run(trainable, num_samples=20, search_alg=search_alg)
Anything else
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Contribute to ray-project/ray - GitHub
Ray cannot access GPUs under a non-root user (failed access of ray.init() to ... [Bug] BasicVariantGenerator not compatible with Repeater bug good first ......
Read more >Tune Search Algorithms — Ray 0.8.4 documentation
BasicVariantGenerator , so you will not be able to use Tune's default variant generation/search space declaration when using BayesOptSearch.
Read more >[Bug] BasicVariantGenerator not compatible with Repeater - Ray ...
As far as I understand, this happens because Repeater expects a Searcher and not a SearchAlgorithm but the former does not exist for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Does something like https://discuss.ray.io/t/tune-multiple-runs-with-same-hyperparameter-different-random-seed/644/2 would do the job for you?
This appears to still be an issue with ray 2.0.0 unfortunately.