Skip to content

Commit 6c3474d

Browse files
Merge pull request #65 from Borda/fix-writer
fix pytorch writer
2 parents a8c207b + 94156a0 commit 6c3474d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
from setuptools import find_packages, setup
33

4-
version = '0.7.3'
4+
version = '0.7.4'
55

66
setup(
77
name='test_tube',

test_tube/log.py

+7
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ def __init__(
150150

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

155162
# register on exit fx so we always close the writer

0 commit comments

Comments
 (0)