Skip to content

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

Open
@mazurkin

Description

@mazurkin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions