KeyError: 'complex32'
erezposner opened this issue · comments
Erez Posner commented
Hi, trying to import lovely-tensors results with this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/__init__.py", line 3, in <module>
from lovely_tensors.repr_str import *
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/repr_str.py", line 77, in <module>
"complex128": "c128",
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/repr_str.py", line 67, in <dictcomp>
for k,v in {"float32": "",
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/repr_str.py", line 60, in type_to_dtype
dtp = vars(torch)[t]
KeyError: 'complex32'
Alexey Zaytsev commented
Thank you. I'll make sure this does not happen. Which PyTorch version are you using?
Erez Posner commented
@xl0 thanks for the prompt response .
I am using PyTorch 1.11.0+cu113
Alexey Zaytsev commented
Thanks. I can reproduce it. Indeed, there is no torch.complex32
in PyTorch 1.11.
I've released 0.1.4
which fixes it. Please let me know if it fixes the issue for you too.
Erez Posner commented
Hi, now I get this error below - my matplotlib version is 3.3.3
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lovely_tensors as lt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/__init__.py", line 6, in <module>
from lovely_tensors.repr_chans import *
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/repr_chans.py", line 7, in <module>
from matplotlib import colormaps
ImportError: cannot import name 'colormaps' from 'matplotlib' (/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/matplotlib/__init__.py)
>>> import lovely_tensors as lt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/__init__.py", line 6, in <module>
from lovely_tensors.repr_chans import *
File "/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/lovely_tensors/repr_chans.py", line 7, in <module>
from matplotlib import colormaps
ImportError: cannot import name 'colormaps' from 'matplotlib' (/home/eposner/anaconda3/envs/cfca_v3/lib/python3.7/site-packages/matplotlib/__init__.py)
Alexey Zaytsev commented
Haha, discovering all sorts of assumptions I made in my code. :)
I'll fix this one too. Hang on there. :)
Alexey Zaytsev commented
I fixed the issue, 0.1.5
is out.
Erez Posner commented
Thank you.