I get this error when I try to execute the example https://github.com/pytorch/ignite/blob/master/examples/mnist/mnist_with_tensorboardx.py
Traceback (most recent call last):
File "/content/mnist_with_tensorboardx.py", line 130, in <module>
args.log_interval, args.log_dir)
File "/content/mnist_with_tensorboardx.py", line 76, in run
@trainer.on(Events.ITERATION_COMPLETED(every=log_interval))
TypeError: 'Events' object is not callable
I’m working on google colab so I had to install some packages and I also used TensorBoard notebook extension:
!pip install --pre pytorch-ignite
!pip install 'grpcio==1.24.3'
!pip install -q tf-nightly-2.0-preview
%load_ext tensorboard
!python /content/mnist_with_tensorboardx.py --log_dir=/tmp/tensorboard_logs
%tensorboard --logdir {/tmp/tensorboard_logs}
According to this issue https://github.com/pytorch/ignite/issues/687, the problem is solved when the latest nightly version is used however for me it’s not the case.