MCPcopy Index your code
hub / github.com/tensorflow/tfjs / summaryFileWriter

Function summaryFileWriter

tfjs-node/src/tensorboard.ts:122–140  ·  view source on GitHub ↗
(
    logdir: string, maxQueue = 10, flushMillis = 120000,
    filenameSuffix = '.v2')

Source from the content-addressed store, hash-verified

120 * @doc {heading: 'TensorBoard', namespace: 'node'}
121 */
122export function summaryFileWriter(
123 logdir: string, maxQueue = 10, flushMillis = 120000,
124 filenameSuffix = '.v2'): SummaryFileWriter {
125 util.assert(
126 logdir != null && typeof logdir === 'string' && logdir.length > 0,
127 () =>
128 `Invalid logdir: ${logdir}. Expected a non-empty string for logdir.`);
129 if (!(logdir in summaryFileWriterCache)) {
130 ensureTensorflowBackend();
131 const backend = nodeBackend();
132 const writerResource = backend.summaryWriter(logdir);
133
134 backend.createSummaryFileWriter(
135 writerResource, logdir, maxQueue, flushMillis, filenameSuffix);
136
137 summaryFileWriterCache[logdir] = new SummaryFileWriter(writerResource);
138 }
139 return summaryFileWriterCache[logdir];
140}

Callers 2

Calls 4

ensureTensorflowBackendFunction · 0.90
nodeBackendFunction · 0.90
summaryWriterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…