tensorboard
tensorboard copied to clipboard
module 'PIL.Image' has no attribute 'ANTIALIAS'
Environment information (required)
Linux:
cuda 11.4 pytorch 1.12.1 Python 3.8.18 PIL 10.3.0 tensorboard 2.14.0
I setup the environment by :
$ conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
Issue description
When using writer.add_figure to add a figure, there is a Error:
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
The original code line in my project is:
writer.add_figure('indicator/CM', fig)
fig is a matplotlib Figure, where a confusion matrix is drawn.
It seems in the process of add_images of add_figure , it is attempted to get the attribute ANTIALIAS of PIL.Image. BUT in the recent update, it was removed! Since version 10.0.0, ANTIALIAS was already removed, but add_figure method still needs it.
Reproduce the problem
Add a figure to a writer. The figure draws a confusion matrix. This should reproduce the problem.