Skip to content

Commit

Permalink
Merge pull request #65 from Borda/fix-writer
Browse files Browse the repository at this point in the history
fix pytorch writer
  • Loading branch information
williamFalcon authored Nov 30, 2019
2 parents a8c207b + 94156a0 commit 6c3474d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
from setuptools import find_packages, setup

version = '0.7.3'
version = '0.7.4'

setup(
name='test_tube',
Expand Down
7 changes: 7 additions & 0 deletions test_tube/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ def __init__(

# set the tensorboardx log path to the /tf folder in the exp folder
log_dir = self.get_tensorboardx_path(self.name, self.version)
# this is a fix for pytorch 1.1 since it does not have this attribute
for attr, val in [('purge_step', None),
('max_queue', 10),
('flush_secs', 120),
('filename_suffix', '')]:
if not hasattr(self, attr):
setattr(self, attr, val)
super().__init__(log_dir=log_dir, *args, **kwargs)

# register on exit fx so we always close the writer
Expand Down

0 comments on commit 6c3474d

Please sign in to comment.