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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple arg name mismatch for mnist tensorboard example #878

Closed
DhDeepLIT opened this issue Apr 4, 2020 · 2 comments 路 Fixed by #883
Closed

simple arg name mismatch for mnist tensorboard example #878

DhDeepLIT opened this issue Apr 4, 2020 · 2 comments 路 Fixed by #883

Comments

@DhDeepLIT
Copy link
Contributor

馃悰 Bug description

Example for mnist with tensorboard does not work due to wrong arg name.

git clone https://github.com/pytorch/ignite
cd examples/mnist
python3.6 mnist_with_tensorboard.py --log_dir=/tmp/tensorboard_logs
Traceback (most recent call last):
File "mnist_with_tensorboard.py", line 161, in
run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum, args.log_interval, args.log_dir)
File "mnist_with_tensorboard.py", line 89, in run
writer = create_summary_writer(model, train_loader, log_dir)
File "mnist_with_tensorboard.py", line 76, in create_summary_writer
writer = SummaryWriter(logdir=log_dir)
TypeError: init() got an unexpected keyword argument 'logdir'

Traceback (most recent call last):
File "mnist_with_tensorboard.py", line 161, in
run(args.batch_size, args.val_batch_size, args.epochs, args.lr, args.momentum, args.log_interval, args.log_dir)
File "mnist_with_tensorboard.py", line 89, in run
writer = create_summary_writer(model, train_loader, log_dir)
File "mnist_with_tensorboard.py", line 76, in create_summary_writer
writer = SummaryWriter(logdir=log_dir)
TypeError: init() got an unexpected keyword argument 'logdir'

Just something that runs ....

Environment

Ubuntu 18.06 LTS, dual 1080Ti, 32 Go RAM, intel i7-2600K

pip3.6 install torch
pip3.6 install torchvision
pip3.6 install tensorboard

pip3.6 list | grep -E 'tensor'|'torch'
pytorch-ignite 0.4.0
tensorboard 2.2.0
tensorboard-plugin-wit 1.6.0.post2
torch 1.4.0
torchvision 0.5.0

@vfdev-5 vfdev-5 added the bug label Apr 4, 2020
@vfdev-5 vfdev-5 added this to To do in 0.4.0 via automation Apr 4, 2020
@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 4, 2020

@DhDeepLIT thanks for the report !
It looks like to be related to different signatures of SummayWriter between torch internal tensorboard and tensorboardX:

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Apr 4, 2020

@DhDeepLIT if you would like to contribute, do not hesitate to send a PR with a fix.
Seems like there are only two places where need to change: logdir -> log_dir:

  • mnist_with_tensorboard.py
  • mnist_save_resume_engine.py

Thanks !

@vfdev-5 vfdev-5 mentioned this issue Apr 4, 2020
3 tasks
DhDeepLIT added a commit to DhDeepLIT/ignite that referenced this issue Apr 4, 2020
@DhDeepLIT DhDeepLIT mentioned this issue Apr 4, 2020
3 tasks
0.4.0 automation moved this from To do to Done Apr 4, 2020
vfdev-5 added a commit that referenced this issue Apr 4, 2020
* close #878

* Update mnist_save_resume_engine.py

Co-authored-by: vfdev <vfdev.5@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
0.4.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants