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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'PIL.Image' has no attribute 'ANTIALIAS' #6853

Open
FuFuDav opened this issue May 17, 2024 · 1 comment
Open

module 'PIL.Image' has no attribute 'ANTIALIAS' #6853

FuFuDav opened this issue May 17, 2024 · 1 comment

Comments

@FuFuDav
Copy link

FuFuDav commented May 17, 2024

Environment information (required)

Linux:
image

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.
image

Reproduce the problem

Add a figure to a writer. The figure draws a confusion matrix.
This should reproduce the problem.

@arcra
Copy link
Member

arcra commented May 21, 2024

Can you add some details about what "writer" you're referring to (what class or implementation you're using)? And share a stack trace?

I'm not sure this is an issue with our code specifically. This might be a pytorch-specific implementation. But those details would help figuring it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants