Skip to content

InspectionUnit.generator is useless as the one-time generator is already used by get_field_to_observations_map #6994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mazurkin opened this issue May 14, 2025 · 0 comments

Comments

@mazurkin
Copy link

mazurkin commented May 14, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants