openfold icon indicating copy to clipboard operation
openfold copied to clipboard

Upgrade DeepSpeed version?

Open bozhang-hpc opened this issue 2 years ago • 4 comments

Hi Gustaf,

Is there any potential trouble to use the latest DeepSpeed with Openfold? I might need some new features from deepspeed.

Thanks,

Bo

bozhang-hpc avatar Feb 16 '23 22:02 bozhang-hpc

We'd also like to use newer versions of deepspeed in order to support python 3.10.

One issue is that deepspeed.utils.is_initialized seems to have been removed. However, I actually don't even see it in the deepspeed version currently used, so not sure how it's working anyway: https://github.com/microsoft/DeepSpeed/blob/v0.5.10/deepspeed/init.py

There do seem to be some other is_initialized methods - perhaps this one is what we want?

JacobHayes avatar Mar 04 '23 01:03 JacobHayes

I stumbled over that issue today. Indeed, using version 0.9.2 of deepspeed and by replacing the lines deepspeed.utils.is_initialized() with deepspeed.comm.comm.is_initialized() in openfold/model/primitives.py, I was finally able to run protein folding in diffdock.

vedifredi avatar May 25 '23 10:05 vedifredi

I had a similar issue when trying to use Openfold as part of ESMFold, with DeepSpeed version 0.9.2 I get the error that deepspeed.utils.is_initialized() doesn't exist anymore. But replacing all occurrences of deepspeed.utils.is_initialized() with deepspeed.comm.comm.is_initialized() in openfold/model/primitives.py fixed the issue for me.

Maybe we can submit a PR to get this updated?

naailkhan28 avatar May 30 '23 10:05 naailkhan28

Bumping this up: I'm running into this issue as well, and downgrading back to deepspeed==0.5.10 as in the environment.yml no longer works with torch==2.0.0 (see this issue). Applying this commit in the fork by @evankomp resolved the inconsistency.

Would be great to see some variant of this solution merged into master!

amyxlu avatar Aug 08 '23 01:08 amyxlu