luyug / GradCache

Run Effective Large Batch Contrastive Learning Beyond GPU/TPU Memory Constraint
Apache License 2.0
327 stars 19 forks source link

Requirements of the python env? #4

Closed MicPie closed 2 years ago

MicPie commented 2 years ago

Hi Luyu,

thank you very much for the very nice and clean repository! :-)

I was playing with GradCache to get it working with a CLIP setup and I needed some trail and error to find the right python version. With 3.6 from contextlib import nullcontext didn't work but with 3.8 I was able to get it to run.

Therefore, I just wanted to ask you, if you have more information on your development environment, e.g., python version, etc., so I can compare it to mine.

Kind regards Michael

luyug commented 2 years ago

I have run with python 3.8.x and 3.9.x and they both worked fine.

As a rule of thumb, you should get a working environment if you use conda to install the latest release of pytorch.