MCPcopy
hub / github.com/tensorflow/tfjs / iterator

Method iterator

tfjs-data/src/sources/file_data_source.ts:45–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 }
44
45 async iterator(): Promise<ByteChunkIterator> {
46 if (isLocalPath(this.input) && env().get('IS_NODE')) {
47 // tslint:disable-next-line:no-require-imports
48 const fs = require('fs');
49 this.input = fs.readFileSync((this.input as string).slice(7));
50 }
51 // TODO(kangyizhang): Add LocalFileChunkIterator to split local streaming
52 // with file in browser.
53 return new FileChunkIterator(this.input as FileElement, this.options);
54 }
55}

Callers

nothing calls this directly

Calls 4

isLocalPathFunction · 0.90
envFunction · 0.90
sliceMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected