question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] BasicVariantGenerator not compatible with Repeater

See original GitHub issue

Search 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:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
LudoHackathoncommented, Jan 19, 2022
0reactions
smonsayscommented, Oct 11, 2022

This appears to still be an issue with ray 2.0.0 unfortunately.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found