Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: numpy.random.mtrand.RandomState object has no attribute integers -> switch to np.random.Generator #17

Closed
themasterlink opened this issue Jan 21, 2022 · 1 comment
Labels

Comments

@themasterlink
Copy link

Hey,

I found a bug, which is easy to fix, the hyperopt backend does not use the deprecated np.random.RandomState anymore and replaced it with np.random.Generator, this means the following line:

def setup_backend(self, params, algo=tpe.suggest, rstate=np.random.RandomState(), show_progressbar=False, **options):

Should be changed to:

    def setup_backend(self, params, algo=tpe.suggest, rstate=np.random.default_rng(), show_progressbar=False, **options): 

This is explained in the following issue on hyperopt:

hyperopt/hyperopt#838

Best,
Max

@evhub evhub closed this as completed in 24f39ea Jan 22, 2022
@evhub evhub added the bug label Jan 22, 2022
@evhub
Copy link
Owner

evhub commented Jan 22, 2022

Thanks for the bug report! Should be fixed now in bbopt>=1.3.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants