Returns summary protos matching given keyword from event file.
(keyword, summary_dir)
| 37 | |
| 38 | |
| 39 | def summaries_with_matching_keyword(keyword, summary_dir): |
| 40 | """Returns summary protos matching given keyword from event file.""" |
| 41 | matches = [] |
| 42 | event_paths = tf.io.gfile.glob(os.path.join(summary_dir, "events*")) |
| 43 | for event in tf.compat.v1.train.summary_iterator(event_paths[-1]): |
| 44 | if event.summary is not None: |
| 45 | for value in event.summary.value: |
| 46 | if keyword in value.tag: |
| 47 | matches.append(event.summary) |
| 48 | return matches |
| 49 | |
| 50 | |
| 51 | def dataset_fn(ctx): |
no test coverage detected