@epfml/discojs-node 2.1.2-p20240531085945.0 → 2.1.2-p20240617070831.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/text_loader.js +1 -1
- package/package.json +1 -1
package/dist/data/text_loader.js
CHANGED
|
@@ -8,7 +8,7 @@ export class TextLoader extends data.TextLoader {
|
|
|
8
8
|
const inputFile = await fs.readFile(source);
|
|
9
9
|
const file = new tfData.FileDataSource(inputFile, { chunkSize: 1024 });
|
|
10
10
|
// TODO: reading files line by line is an issue for LLM tokenization
|
|
11
|
-
const dataset = new tfData.TextLineDataset(file).filter(s => s
|
|
11
|
+
const dataset = new tfData.TextLineDataset(file).filter(s => s !== ' '); // newline creates empty strings
|
|
12
12
|
return Promise.resolve(dataset);
|
|
13
13
|
}
|
|
14
14
|
}
|