From 23610c74032f70596431a43fc855d2547e375da3 Mon Sep 17 00:00:00 2001 From: Jacob Szwejbka Date: Wed, 8 May 2024 11:16:55 -0700 Subject: [PATCH] off by one (#724) --- generate.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/generate.py b/generate.py index 9824943ae..72dec587f 100644 --- a/generate.py +++ b/generate.py @@ -615,11 +615,7 @@ def _main( # arbitrarily large number as chat mode goes until max_seq length # or user exits num_samples = generator_args.num_samples if not generator_args.chat_mode else 100000 - i = ( - -1 - ) # long loop and Im scared someone will add a continue in it, so start at -1 and increment at the start - while i < num_samples: - i += 1 + for i in range(num_samples): device_sync(device=builder_args.device) if i >= 0 and generator_args.chat_mode: prompt = input("User: ")