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

Decouple printing logs to stdout from tensorboard #1376

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pavanholla
Copy link
Contributor

@pavanholla pavanholla commented Mar 11, 2025

Commit 7bc0f48 introduced a config to disable tensorboard. However, it unintentionally disable printing to stdout as well. This CL separates the logic that prints logs from the logic the writes to tensorboard.

Test:
Check that enable_tensorboard=False and enable_tensorboard=True lead to the same logs on stdout.

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Test:
Check that enable_tensorboard=False and enable_tensorboard=True lead to
the same logs on stdout.
Comment on lines +93 to +95
with jax.spmd_mode("allow_all"):
if is_training:
self._log_metrics(metrics, step)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to gate the logging with with jax.spmd_mode("allow_all") and if metrics to write? I see a duplicate PR was created that isn't gating with those. Are the extra conditions needed here?

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

Successfully merging this pull request may close these issues.

2 participants