MCPcopy Create free account
hub / github.com/tensorflow/tfjs / toArrayForTest

Function toArrayForTest

tfjs-data/src/dataset.ts:526–531  ·  view source on GitHub ↗

* Collect all elements of this dataset into an array with prefetching 100 * elements. This is useful for testing, because the prefetch changes the * order in which the Promises are resolved along the processing pipeline. * This may help expose bugs where results are dependent on the order o

()

Source from the content-addressed store, hash-verified

524 * when a new stream has been obtained and fully consumed.
525 */
526 async toArrayForTest() {
527 if (this.size === Infinity) {
528 throw new Error('Can not convert infinite data stream to array.');
529 }
530 return (await this.iterator()).toArrayForTest();
531 }
532}
533
534/**

Callers

nothing calls this directly

Calls 1

iteratorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…