cyyever / distributed_learning_simulator

For distributed machine learning
28 stars 11 forks source link

ImportError and ModuleNotFoundError #4

Open jiaqifan123 opened 1 year ago

jiaqifan123 commented 1 year ago

Hello, author. When I configured the environment and ran the following code:bash gtg_shapley_train.sh, I encountered these problems:ModuleNotFoundError: No module named 'spacy', assert has_torch_geometric, ModuleNotFoundError: No module named 'torchmetrics'.How should I solve these problems? thank you very much.

cyyever commented 1 year ago

@jiaqifan123 Assume you are using pip, follow these steps:

  1. git update distributed_learning_simulator because I just uploaded some fixes.
  2. pip uninstall cyy_torch_toolbox
  3. pip install git+ssh://git@github.com/cyyever/torch_toolbox.git@main#egg=cyy_torch_toolbox
  4. pip install spacy
  5. pip install torchmetrics , then it should work.
jiaqifan123 commented 10 months ago

Hello, author. In the second line of the practitioner.py file under your recently updated simulation_lib: from cyy_torch_toolbox.dataset import DatasetCollectionSampler. I found that DatasetCollectionSampler was missing, which caused the program to fail to run. Is there any solution? Thank you very much.

rafaelbarbarroxa commented 9 months ago

Did you manage to resolve the DatasetCollectionSampler error?

cyyever commented 9 months ago

@rafaelbarbarroxa git pull to the latest version and it should work

cyyever commented 9 months ago

@jiaqifan123 git pull to the latest version and it should work

rafaelbarbarroxa commented 9 months ago

I am getting this error now: ModuleNotFoundError: No module named 'simulation_lib.method.adaptive_graph_avg'

cyyever commented 9 months ago

@rafaelbarbarroxa I fixed the errors, please re-pull

rafaelbarbarroxa commented 9 months ago

Got it working, thank you @cyyever