Skip to content
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

Missing import in t5x/checkpoints.py #1353

Open
rajansaini691 opened this issue Aug 2, 2023 · 1 comment
Open

Missing import in t5x/checkpoints.py #1353

rajansaini691 opened this issue Aug 2, 2023 · 1 comment

Comments

@rajansaini691
Copy link

Hi! There seems to be a missing import in t5x/checkpoints.py. Inserting the proposed import (based on this) seems to have done the trick, but before that line gets permanently engraved into a PR until the end of time, I'd like to raise this for discussion.

Proposed import

from tensorboard.backend.event_processing import io_wrapper

Culprit code

  for subdir in io_wrapper.GetLogdirSubdirectories(checkpoints_dir):    # this io_wrapper is feeling very lost...
    rpath = os.path.relpath(subdir, checkpoints_dir)
    # Skip runs that do not match user-specified metric.
    if ((not metric_run and
         not _try_fill_metric_run_and_tag_names(metric_name, (rpath,))) or
        metric_run != rpath):
      logging.info('Skipping events in %s', subdir)
      continue

    logging.info('Looking for events in %s', subdir)
    loader = directory_watcher.DirectoryWatcher(
        subdir, event_file_loader.EventFileLoader,
        io_wrapper.IsTensorFlowEventsFile)              #  ... and this one, too :(
@Dnmh
Copy link
Contributor

Dnmh commented Jul 21, 2024

I'm having the same issue, some additional imports were missing (event_file_loader, directory_watcher).
Extending the solution above resolved the issue:

from tensorboard.backend.event_processing import io_wrapper, event_file_loader, directory_watcher

copybara-service bot pushed a commit that referenced this issue Jul 29, 2024
PiperOrigin-RevId: 657208154
copybara-service bot pushed a commit that referenced this issue Jul 29, 2024
PiperOrigin-RevId: 657208154
copybara-service bot pushed a commit that referenced this issue Jul 29, 2024
PiperOrigin-RevId: 657208154
copybara-service bot pushed a commit that referenced this issue Jul 30, 2024
PiperOrigin-RevId: 657208154
copybara-service bot pushed a commit that referenced this issue Jul 30, 2024
PiperOrigin-RevId: 657208154
copybara-service bot pushed a commit that referenced this issue Jul 30, 2024
PiperOrigin-RevId: 657567841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants