TypeError: __init__() got an unexpected keyword argument 'log_dir'
See original GitHub issueMachine: Amazon EC2 Deep Learning AMI (pytorch_p36 environment)
I have a training script that is trying to create a TensorboardLogger
, but that is failing with the below stacktrace. I have pip installed the latest version of ignite.
File "train.py", line 336, in train
tb_logger = TensorboardLogger(log_dir=None)
File "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/ignite/contrib/handlers/tensorboard_logger.py", line 355, in __init__
self.writer = SummaryWriter(log_dir=log_dir)
File "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/tensorboardX/writer.py", line 254, in __init__
self._get_file_writer()
File "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-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'
Could you please explain why this is happening and what I can do to fix it? Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
TypeError: __init__() got an unexpected keyword argument ...
I encounter the issue,as follows: '''TypeError: init() got an unexpected keyword argument 'logdir'''' How can I solve this issue? tensorflow ...
Read more >TypeError: __init__() got an unexpected keyword argument ...
I am trying to build model to convert Sign Language to text. I am facing some problem while trying to create and using...
Read more >init() got an unexpected keyword argument 'log_dir'_农夫山泉 ...
pytorch报错TypeError: init() got an unexpected keyword argument 'log_dir' ... SummaryWriter(logdir=log_dir) self.writer = tensorboardX.
Read more >After updating from Ray 1.0.1 to 1.2, custom model stops ...
TypeError : __init__() got an unexpected keyword argument 'drop_rate' ... Module): def __init__(self, obs_space, action_space, num_outputs, ...
Read more >tensorflow/skflow - Gitter
StreamDataFeeder does and without this DaskDataFeeder does not have ... in outputs: TypeError: evaluate() got an unexpected keyword argument 'batch_size'.
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 did that, but still am encountering the problem. I reverted my tensorboardX to 1.6, I think it’s fixing the problem.
@UltraSpecialException I think the code you are trying to use: https://github.com/huggingface/transfer-learning-conv-ai/blob/b7f295f840f719056287504554083ec3f2688651/train.py#L234 is working with tensorboardX < 1.7 since tensorboardx master SummaryWriter has attribute
logdir
instead oflog_dir
… https://github.com/lanpa/tensorboardX/blob/3e35c9b5f85e8ceb0294532d9eb772341a04c097/tensorboardX/writer.py#L244Btw, yes, ignite is compatible with python 2.7 and 3.x