EPFLiGHT / cumulator

A tool to quantify and report the carbon footprint of machine learning computations and communication
MIT License
21 stars 5 forks source link

ModuleNotFoundError upon `from cumulator import base` #25

Open Grim-bot opened 2 years ago

Grim-bot commented 2 years ago

We got the following feedback:

I just pip install Cumulator and its dependencies and from cumulator import base as suggested by the project description, and there is this error.

>>from cumulator import base
File "/home/roazbind/.conda/envs/robin_env/lib/python3.8/site-packages/cumulator/base.py", line 16, in <module>
from src.cumulator.prediction_feature.prediction_helper import get_predictions, compute_features
ModuleNotFoundError: No module named 'src'
dinotuku commented 2 years ago

I got the same error from from cumulator import base when I installed cumulator with pip install -e . after cloning the repository. It would throw this error whenever I was not in the base directory of the repo.

I was able to make it work by removing src. in lines 16 and 17 of base.py. After doing this, there is no more error no matter which directory I am in.

I am not super familiar with how the path searching works in a package, but I hope this experience could help a bit.