-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Porting back code from pytorch/pytorch and tensorflow/tensorboard (1) (…
…#422) * backport from pytorch side: comments docstrings variable names * fix logdir * backport from tensorboard
- Loading branch information
Showing
9 changed files
with
464 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
from time import sleep | ||
from tensorboardX import SummaryWriter | ||
|
||
with SummaryWriter(log_dir='runs/purge') as w: | ||
with SummaryWriter(logdir='runs/purge') as w: | ||
for i in range(100): | ||
w.add_scalar('purgetest', i, i) | ||
|
||
sleep(1.0) | ||
|
||
with SummaryWriter(log_dir='runs/purge', purge_step=42) as w: | ||
with SummaryWriter(logdir='runs/purge', purge_step=42) as w: | ||
# event 42~99 are removed (inclusively) | ||
for i in range(42, 100): | ||
w.add_scalar('purgetest', 42, i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.