-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add patch_tensorboard
#204
Conversation
2acd41c
to
c6458e3
Compare
|
||
|
||
def patch_tensorboard(override: bool = True, **kwargs): | ||
live = Live(**kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if patch_tensorboard
should instead optionally accept a Live
instance
Codecov Report
@@ Coverage Diff @@
## main #204 +/- ##
==========================================
- Coverage 91.07% 91.05% -0.02%
==========================================
Files 19 19
Lines 605 671 +66
==========================================
+ Hits 551 611 +60
- Misses 54 60 +6
Continue to review full report at Codecov.
|
assert "epoch_accuracy" in logs | ||
assert len(logs["epoch_accuracy"]) == 2 | ||
|
||
for patch in patches: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in case of using dvclive
with tensorboard
we would need to revert the patches after the execution in order to not use modified tensorboard
later in our project?
Shouldn't patch_tensorboard
be a context manager that would revert the patch after exiting the context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to test it but I think that the patch doesn't persist across python executions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the same process? I think safest way would be to let the user control when the dvclive
is patching the tensorboard.
Support TensorFlow tensors in scalar and image data.
c6458e3
to
3710581
Compare
Discussed with @daavoo that we will hold off on merging this. |
β I have followed the Contributing to DVCLive guide.
π If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Add
patch_tensorboard
function.It can override or extend existing tensorboard logging calls by redirecting those to
Live.log
/Live.log_image
calls.This allows to patch both raw tensorboard calls but also existing callbacks using tensorboard:
patch_tensorboard(override=False)
would generate DVCLive outputs while preserving the original behavior.