Skip to content

Commit abe2f02

Browse files
neerajpradfritzo
authored andcommitted
Fix flaky test in test_enum.py (pyro-ppl#524)
1 parent 31dabcd commit abe2f02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/infer/test_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def finite_difference(eval_loss, delta=0.1):
186186
params = pyro.get_param_store().get_all_param_names()
187187
assert params, "no params found"
188188
grads = {name: Variable(torch.zeros(pyro.param(name).size())) for name in params}
189-
for name in params:
189+
for name in sorted(params):
190190
value = pyro.param(name).data
191191
for index in itertools.product(*map(range, value.size())):
192192
center = value[index]

0 commit comments

Comments
 (0)