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

Enable tensor logging if possible #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [UNRELEASED] neptune-tensorboard 1.0.3

### Fixes
- Fix not logging `tensors` events ([#71](https://github.com/neptune-ai/neptune-tensorboard/pull/71))


## neptune-tensorboard 1.0.2

### Changes
Expand Down
9 changes: 9 additions & 0 deletions src/neptune_tensorboard/sync/sync_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import click
import neptune
from neptune.utils import stringify_unsupported
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator

try:
Expand Down Expand Up @@ -102,5 +103,13 @@ def _export_to_neptune_run(self, path):
for hparam in reader.hparams.itertuples():
namespace_handler["hparams"][hparam.tag].append(hparam.value)

# Read tensors
if hasattr(reader, "tensors"):
for tensor in reader.tensors.itertuples():
namespace_handler["tensor"][tensor.tag].append(
stringify_unsupported(tensor.value),
step=tensor.step,
)

# user facing
click.echo(f"{path} was exported with run_id: {hash_run_id}")
Loading