提交 8fbf31d6 authored 作者: Reyhane Askari's avatar Reyhane Askari

expectedFailure_fast decorator added with minor fixes

上级 686bcd80
......@@ -408,9 +408,9 @@ class DestroyHandler(toolbox.Bookkeeper): # noqa
destroy_maps = getattr(app.op, 'destroy_map', {}).values()
if idx in [dmap for sublist in destroy_maps for dmap in sublist]:
return True
for var in getattr(app.op, 'view_map', {}).keys():
if idx in app.op.view_map[var] and recursive_destroys_finder(app.outputs[var]):
return True
for var_idx in getattr(app.op, 'view_map', {}).keys():
if idx in app.op.view_map[var_idx] and recursive_destroys_finder(app.outputs[var_idx]):
return True
return False
for protected_var in protected_list:
......
......@@ -445,3 +445,10 @@ class AttemptManyTimes:
current_seed = str(int(current_seed) + 1)
return attempt_multiple_times
def expectedFailure_fast():
"""A Decorator to handle the test cases that are failing when
THEANO_FALGS =cycle_detection='fast'.
"""
return unittest.expectedFailure if theano.config.cycle_detection == 'fast' else lambda x: x
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论