hyperas
hyperas copied to clipboard
module 'hyperopt.pyll' has no attribute 'base'
Hi I'm trying to us Hyperas to optimise my Neural Network but I keep receiving this error message:
module 'hyperopt.pyll' has no attribute 'base'
It comes from that function:
def memo_from_config(self, config):
memo = {}
for node in pyll.dfs(self.expr):
if node.name == "hyperopt_param":
label = node.arg["label"].obj
# -- hack because it's not really garbagecollected
# this does have the desired effect of crashing the
# function if rec_eval actually needs a value that
# the the optimization algorithm thought to be unnecessary
memo[node] = config.get(label, pyll.base.GarbageCollected)
return memo
Someone has an idea how I can fix it ? my script where I used Hyperas: https://gist.github.com/julesangebault/264359cc037dfe3ceee2d8b36b042869
Hey I had the same issue with you after I downgraded hyperopt to v0.2.5 to avoid the error 'numpy.random.mtrand.RandomState' object has no attribute 'integers'
#284. Then I solved it by changing the row 139 of optim.py in hyperas from:
rstate=np.random.RandomState(rseed)
to
rstate=np.random.default_rng(rseed)
with hyperopt==0.2.7
Hope it will work for you!