Skip to content

Commit 2f35480

Browse files
Update generative-proof-of-concept-CPU-preprocessing-in-memory.py
Test iteration change...
1 parent 956d8dd commit 2f35480

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

generative-proof-of-concept-CPU-preprocessing-in-memory.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,11 +1329,14 @@ def _expand_next_batch(self):
13291329
start_idx = self.current_index
13301330
end_idx = min(start_idx + self.sample_expansion_batch_size, len(self.raw_text_samples))
13311331
collect()
1332-
if start_idx >= end_idx:
1333-
self.current_index = 0 # raise StopIteration("No more raw samples to process.")
1334-
start_idx = 0
1335-
end_idx = min(self.sample_expansion_batch_size, len(self.raw_text_samples))
1332+
# if start_idx >= end_idx:
1333+
# self.current_index = 0 # raise StopIteration("No more raw samples to process.")
1334+
# start_idx = 0
1335+
# end_idx = min(self.sample_expansion_batch_size, len(self.raw_text_samples))
13361336

1337+
if start_idx >= end_idx:
1338+
raise StopIteration("No more raw samples to process.")
1339+
13371340
batch_samples = self.raw_text_samples[start_idx:end_idx]
13381341
self.current_index = end_idx
13391342

0 commit comments

Comments
 (0)