TypeError:使用Hyperopt时,“ **之后的set_postfix()参数必须是映射,而不是str”

时间:2019-05-10 22:05:40

标签: python hyperopt

我尝试运行以下简单示例:

from hyperopt import fmin, tpe, hp

best = fmin(
fn=lambda x: (x-1)**2,
space=hp.uniform('x', -2, 2),
algo=tpe.suggest,
max_evals=100)

print(best)

但这是我在控制台中得到的:

...\WinPython\python-3.6.5.amd64\Lib\site-packages\tqdm\_tqdm.py", line 792, in __init__
self.set_postfix(refresh=False, **postfix)

TypeError:**之后的set_postfix()参数必须是映射,而不是str

为什么?

提前谢谢!

0 个答案:

没有答案
相关问题