Skip to content

Commit 6b206ac

Browse files
Update generative-proof-of-concept-CPU-preprocessing-in-memory.py
For now replace "\n" in text samples to make logged generated text more readable and searchable.
1 parent 7d02cac commit 6b206ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def package_non_instruct_text(text: str, desired_samples: int, max_length_tokens
325325

326326
# Add the final sample if we have any remaining sentences
327327
if current_sample_sentences and len(samples) < desired_samples:
328-
sample = " ".join(current_sample_sentences)
328+
sample = " ".join(current_sample_sentences).replace("\n",' ')
329329
samples.append(sample)
330330

331331
return samples

0 commit comments

Comments
 (0)