提交 19f1566f authored 作者: Ricardo's avatar Ricardo 提交者: Thomas Wiecki

Remove `warn__identify_1pexp_bug` flag

上级 a5b7b68f
......@@ -1436,14 +1436,6 @@ def add_deprecated_configvars():
in_c_key=False,
)
# TODO: remove?
config.add(
"warn__identify_1pexp_bug",
"Warn if Aesara versions prior to 7987b51 (2011-12-18) could have "
"yielded a wrong result due to a bug in the is_1pexp function",
BoolParam(_warn_default("0.4.1")),
in_c_key=False,
)
# TODO: this setting is not used anywhere
config.add(
"gpu__local_elemwise_fusion",
......
......@@ -3068,19 +3068,6 @@ def is_1pexp(t, only_process_constants=True):
scal_sum = scal_sum + s
if np.allclose(scal_sum, 1):
return False, maybe_exp.owner.inputs[0]
# Before 7987b51 there used to be a bug where *any* constant
# was considered as if it was equal to 1, and thus this
# function would incorrectly identify it as (1 + exp(x)).
if config.warn__identify_1pexp_bug:
warnings.warn(
"Although your current code is fine, please note that "
"Aesara versions prior to 0.5 (more specifically, "
"prior to commit 7987b51 on 2011-12-18) may have "
"yielded an incorrect result. To remove this warning, "
"either set the `warn__identify_1pexp_bug` config "
"option to False, or `warn__ignore_bug_before` to at "
"least '0.4.1'."
)
return None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论