提交 4e80f755 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

If deleting modules that were not too old to use, emit a warning.

However, this warning will not be emitted if deleting all modules (this is done by "theano-cache clear", for instance).
上级 63144068
...@@ -986,9 +986,12 @@ class ModuleCache(object): ...@@ -986,9 +986,12 @@ class ModuleCache(object):
# Ensure that the too_old_to_use list return by refresh() will # Ensure that the too_old_to_use list return by refresh() will
# contain all modules older thatn age_thresh_del. # contain all modules older thatn age_thresh_del.
if age_thresh_del < self.age_thresh_use: if age_thresh_del < self.age_thresh_use:
info("Clearing modules that were not deemed to old to use:", if age_thresh_del > 0:
"age_thresh_del=%d," % age_thresh_del, warning("Clearing modules that were not deemed to old to use:",
"self.age_thresh_use=%d" % self.age_thresh_use) "age_thresh_del=%d," % age_thresh_del,
"self.age_thresh_use=%d" % self.age_thresh_use)
else:
info("Clearing all modules.")
age_thresh_use = age_thresh_del age_thresh_use = age_thresh_del
else: else:
age_thresh_use = None age_thresh_use = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论