UbiquitousLearning / End2end-Federated-Learning

A demo of end-to-end federated learning system.
68 stars 32 forks source link

server part runtime error with mnn #5

Open justin5718 opened 2 years ago

justin5718 commented 2 years ago

l install the related python packages as the readme said , and run demo server code on ubuntu with 2 android devices. after device join the system and the training starts there raises an error on server part. the following is the log.

[ 2022-06-19 21:13:48 ] receive mnn model from 192.168.0.101 [ 2022-06-19 21:13:48 ] receive mnn model from 192.168.0.102 ./aggregateModel.out: error while loading shared libraries: libMNN_Express.so: cannot open shared object file: No such file or directory Exception in thread modelIndexThread: Traceback (most recent call last): File "/home/anaconda3/envs/fl_m/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/home/anaconda3/envs/fl_m/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "server.py", line 59, in model_index f = open("../model/mnist.snapshot.mnn", "rb") FileNotFoundError: [Errno 2] No such file or directory: '../model/mnist.snapshot.mnn'

it seems the error is realated to the mnn , the server.py line57 os.system("./aggregateModel.out ../model/ ../model/mnist.snapshot.mnn") l guess this command creates a file mnist.snapshot.mnn but failed, in the readme there is no other docs about mnn , could you give me some advice fixxing the error, thx

destinyson commented 2 years ago

I think maybe the devices don't have the permission to visit the folder, or there isn't the file named 'mnist.snapshot.mnn'. You can firstly try to visit the folder by adb, if you can visit it, then try to create the file and restart the server.

justin5718 commented 2 years ago

hello can you give me source code(cpp) of the executable which path is Server-Python/py/aggregateModel.out? its role is to aggerate the model of sampled clients. There is err when ruuning the command os.system("./aggregateModel.out ../model/ ../model/mnist.snapshot.mnn") so l would like to compile the code on my platform, thx

UbiquitousLearning commented 1 year ago

Sorry for answering you so late. Of course we can display the source code, and we will pull it as soon as possible. Then, we will tell reader to get the source code in readme.

justin5718 commented 1 year ago

thx

LiHebai commented 2 months ago

I have encountered the same problem as above, how can I solve it. 屏幕截图 2024-04-27 213528