facebookresearch/FLSim

Error running tests - ModuleNotFoundError: No module named 'flsim.scripts', flsim.fb'

Closed this issue · 1 comments

🐛 Bug

I am trying to contribute to this project, however when running tests via pytest -ra, I am getting ModuleNotFoundError errors.

To Reproduce

⚠️ We cannot help you without you sharing reproducible code. Do not ignore this part :)
Steps to reproduce the behavior:

  1. pytest -ra

Hint: make sure your test modules/packages have valid Python names.
Traceback:
flsim/lib/python3.7/importlib/init.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
flsim/trainers/tests/test_trainer.py:31: in
from flsim.fb.data.hive_data_utils import create_dataloader
E ModuleNotFoundError: No module named 'flsim.fb'
______________________________________________________________________________ ERROR collecting scripts/tests/test_old_config_converter.py _______________________________________________________________________________
ImportError while importing test module 'FLSim/scripts/tests/test_old_config_converter.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
flsim/lib/python3.7/importlib/init.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
scripts/tests/test_old_config_converter.py:12: in
from flsim.scripts.old_config_converter import get_new_fl_config
E ModuleNotFoundError: No module named 'flsim.scripts'

Expected behavior

Environment

Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
  • PyTorch Version (e.g., 1.0):
  • OS (e.g., Linux):
  • How you installed PyTorch (conda, pip, source):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

Additional context