make sure we have enough samples before checking termination inactivity threshold

This commit is contained in:
xenofem 2022-02-24 00:38:04 -05:00
parent 710fc9fe81
commit 595c8026bf

View file

@ -132,6 +132,11 @@ while True:
), end='') ), end='')
sys.stdout.flush() sys.stdout.flush()
if final and current >= args.termination_value_threshold*final and all(d == 0 for d in deltas[-args.termination_inactivity_threshold:]): if (
final
and current >= args.termination_value_threshold*final
and len(deltas) >= args.termination_inactivity_threshold
and all(d == 0 for d in deltas[-args.termination_inactivity_threshold:])
):
print() print()
break break