tensorflow / tensorflow/tensorboard
`InspectionUnit.generator` is useless as the one-time generator is already used by `get_field_to_observations_map`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Description
Environment information (required)
TensorBoard 2.19
Issue description
I am trying to access the TensorBoard data for my own graphs, alerting and review
import tensorboard.backend.event_processing.event_file_inspector
a = tensorboard.backend.event_processing.event_file_inspector.get_inspection_units(logdir=manager.summary_folder)
# Found event files in:
# runs/20250514-105417
# runs/20250514-105417/loss_epoch_trn
# runs/20250514-105417/loss_trn
# runs/20250514-105417/loss_epoch_tst
a[1].name
# 'runs/20250514-105417/loss_epoch_trn'
list(a[1].generator)
# [] <- this the problem
I noticed all generators from generators_from_logdir can be used only once and probably this is the problem, as this generator is already used in field_to_obs=get_field_to_observations_map(generator, tag):
inspection_units.append(
InspectionUnit(
name=subdir,
generator=generator,
field_to_obs=get_field_to_observations_map(generator, tag),
)
)
It would be nice to have a clean API to access the metrics from TensorBoard without installing whole TensorFlow package.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tensorboard.backend.event_processing.event_file_inspector, especially get_inspection_units and get_field_to_observations_map, and reproduce the one-time generator behavior with the example in the issue. The work is done when an InspectionUnit's generator can be used to access the metrics after inspection without requiring TensorFlow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100