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

Optional import of tf or pt in tb receiver #2597

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

holgerroth
Copy link
Collaborator

Fixes # .

Description

TBReceiver only works with tensorboard + torch. Make it available with Tensorflow as well using optional imports.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

@holgerroth
Copy link
Collaborator Author

/build

@holgerroth holgerroth marked this pull request as draft May 23, 2024 16:56
@holgerroth
Copy link
Collaborator Author

The TF SummarryWrite object seems to work differently to the Torch one. I get this error now
AttributeError: 'SummaryWriter' object has no attribute 'add_scalar'. Any ideas @YuanTingHsieh ?

tf, tf_ok = optional_import(module="tensorflow")
if tf_ok and not torch_ok:
# flake8: noqa: F811
from tensorflow.summary import SummaryWriter
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the TF SummaryWriter has the same functions such as add_scalar()

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.

None yet

2 participants