TypeError: type object got multiple values for keyword argument 'logdir'
See original GitHub issuefrom ignite.contrib.handlers.tensorboard_logger import TensorboardLogger tb = TensorboardLogger(log_dir=None)
gives the following error:
self.file_writer = FileWriter(logdir=log_dir, **kwargs)
TypeError: type object got multiple values for keyword argument ‘logdir’
This also happens when I run
from tensorboardX import SummaryWriter sw = SummaryWriter(log_dir=None)
self.file_writer = FileWriter(logdir=log_dir, **kwargs)
TypeError: type object got multiple values for keyword argument ‘logdir’
However, when I do don’t put in logdir=log_dir, and simply pass in log_dir, it works fine.
I was looking to see if there’s any conflicting reference with self
or anything like that, but it doesn’t seem like that’s the problem, since all the self
’s seem to be in place, so I’m not sure.
Any ideas?
ignite version: 1.1.0 tensorboard version: 1.13.1 tensorboardX version: 1.6
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
got multiple values for keyword argument - python
The problem is that the first argument passed to class methods in python is ... "TypeError: foodo() got multiple values for keyword argument...
Read more >TypeError: got multiple values for argument in Python
The Python TypeError: got multiple values for argument occurs when we overwrite the value of a positional argument with a keyword argument ......
Read more >type object got multiple values for keyword argument 'logdir'_ ...
1. TypeError: type object got multiple values for keyword argument 'logdir'. 在这里插入图片描述 解决方案:.
Read more >Custom model field/form: __init__() got multiple values for ...
Hello, The problematic code can be found here: <https://gist.github.com/1229708> TypeError: __init__() got multiple values for keyword argument 'baz'
Read more >Got Multiple Values For Keyword Argument 'X' - ADocLib
TypeError : type object got multiple values for keyword argument 'logdir' #538. Closed. UltraSpecialException opened this issue on May 27.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the problem is in
self.writer = SummaryWriter(logdir=log_dir)
intensorboard_logger.py
(line 408 in the class TensorboardLogger).logdir
should belog_dir
(since the class SummaryWriter has parameterlog_dir
, notlogdir
).I think we need handle both version for instance until 0.3.0. So we need to intercept the exception
and raise a warning saying to update to tensorboardX==1.7 and setup
self.writer
with another argument.cc @anmolsjoshi