facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
2.97k stars 586 forks source link

No module named 'torch._six' #621

Open DipBobDar opened 9 months ago

DipBobDar commented 9 months ago

NOTE: if this is not a bug report, please use the GitHub Discussions for support questions (How do I do X?), feature requests, ideas, showcasing new applications, etc.

Bug description 'torch._six' has been discontinued in latest version of pytorch

Reproduction steps Enter steps to reproduce the behavior.

Expected behavior Following all the steps given in the example

Logs ModuleNotFoundError Traceback (most recent call last)

in <cell line: 2>() 1 import torch ----> 2 from torch._six import inf 3 import esm 4 5 model = esm.pretrained.esmfold_v1()

ModuleNotFoundError: No module named 'torch._six'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

Output goes here

Additional context Add any other context about the problem here. (like proxy settings, network setup, overall goals, etc.)

j-berg commented 9 months ago

I got this error to go away by doing as recommended here: https://github.com/microsoft/DeepSpeed/issues/2845#issuecomment-1576127410

This upgraded deepspeed in my environment from v0.5.9 -> v0.10.3, and the related error disappeared.

This is also likely related to me using Pytorch 2.0.1, when the ESM conda environment specifies Pytorch 1.12.*

Heatseeker-3 commented 3 months ago

I am getting same error.

utils\utils_amp.py", line 4, in from torch._six import container_abcs ModuleNotFoundError: No module named 'torch._six'