MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / events_from_logdir

Function events_from_logdir

tensorflow/python/kernel_tests/summary_ops_test.py:1221–1236  ·  view source on GitHub ↗

Returns all events in the single eventfile in logdir. Args: logdir: The directory in which the single event file is sought. Returns: A list of all tf.Event protos from the single event file. Raises: AssertionError: If logdir does not contain exactly one file.

(logdir)

Source from the content-addressed store, hash-verified

1219
1220
1221def events_from_logdir(logdir):
1222 """Returns all events in the single eventfile in logdir.
1223
1224 Args:
1225 logdir: The directory in which the single event file is sought.
1226
1227 Returns:
1228 A list of all tf.Event protos from the single event file.
1229
1230 Raises:
1231 AssertionError: If logdir does not contain exactly one file.
1232 """
1233 assert gfile.Exists(logdir)
1234 files = gfile.ListDirectory(logdir)
1235 assert len(files) == 1, 'Found not exactly one file in logdir: %s' % files
1236 return events_from_file(os.path.join(logdir, files[0]))
1237
1238
1239def to_numpy(summary_value):

Calls 3

events_from_fileFunction · 0.70
ExistsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected