ECP-CANDLE / candle_lib

MIT License
1 stars 9 forks source link

Pytorch dependency #9

Open jamieOverbeek opened 2 years ago

jamieOverbeek commented 2 years ago

After installing candle in a fresh conda environment with 'pip install git+https://github.com/ECP-CANDLE/candle_lib@develop', I try to import candle and get the following error:

import candle Traceback (most recent call last): File "", line 1, in File "/homes/joverbeek/.conda/envs/candle_env/lib/python3.7/site-packages/candle/init.py", line 165, in from .ckpt_pytorch_utils import CandleCkptPyTorch File "/homes/joverbeek/.conda/envs/candle_env/lib/python3.7/site-packages/candle/ckpt_pytorch_utils.py", line 11, in import torch ModuleNotFoundError: No module named 'torch'

jmohdyusof commented 2 years ago

There was a logic error where a pytorch function was loaded outside the pytorch guard. It should be fixed as of a recent push