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

log_dir error #159

Closed
wants to merge 1 commit into from
Closed

log_dir error #159

wants to merge 1 commit into from

Conversation

gisforgirard
Copy link
Contributor

Traceback (most recent call last):
File "train.py", line 971, in
writer = SummaryWriter(log_dir=log_event_path)
File "/usr/local/lib/python3.6/dist-packages/tensorboardX/writer.py", line 254, in init
self._get_file_writer()
File "/usr/local/lib/python3.6/dist-packages/tensorboardX/writer.py", line 310, in _get_file_writer
self.file_writer = FileWriter(logdir=self.logdir, **self.kwargs)
TypeError: init() got an unexpected keyword argument 'log_dir'

looking at the function, the argument is supposed to be logdir not log_dir

Traceback (most recent call last):
  File "train.py", line 971, in <module>
    writer = SummaryWriter(log_dir=log_event_path)
  File "/usr/local/lib/python3.6/dist-packages/tensorboardX/writer.py", line 254, in __init__
    self._get_file_writer()
  File "/usr/local/lib/python3.6/dist-packages/tensorboardX/writer.py", line 310, in _get_file_writer
    self.file_writer = FileWriter(logdir=self.logdir, **self.kwargs)
TypeError: __init__() got an unexpected keyword argument 'log_dir'

looking at the function, the argument is supposed to be logdir not log_dir
@@ -968,7 +968,7 @@ def restore_parts(path, model):
else:
log_event_path = "log/run-test" + str(datetime.now()).replace(" ", "_")
print("Log event path: {}".format(log_event_path))
writer = SummaryWriter(log_dir=log_event_path)
writer = SummaryWriter(logdir=log_event_path)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be incompatible to the older version of tensorboardX. How about SummaryWriter(log_event_path)?

Copy link
Contributor Author

@gisforgirard gisforgirard Jun 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call, just tested it, that works for me

@r9y9 r9y9 closed this in 1c75289 Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants