提交 c5f3a701 authored 作者: Frederic's avatar Frederic

Fix crash when the config value wasn't evaluated.

上级 fa9e7be4
......@@ -126,6 +126,8 @@ def _config_print(thing, buf):
for cv in _config_var_list:
print >> buf, cv
print >> buf, " Doc: ", cv.doc
if not hasattr(cv, 'val'):
cv.__get__()
print >> buf, " Value: ", cv.val
print >> buf, ""
......@@ -140,6 +142,9 @@ def get_config_md5():
"""
all_opts = sorted([c for c in _config_var_list if c.in_c_key],
key=lambda cv: cv.fullname)
for opt in all_opts:
if not hasattr(opt, 'val'):
opt.__get__()
return theano.gof.cc.hash_from_code('\n'.join(
['%s = %s' % (cv.fullname, cv.val) for cv in all_opts]))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论