PaddlePaddle / PaddleFL

Federated Deep Learning in PaddlePaddle
Apache License 2.0
496 stars 121 forks source link

在使用运行paddlefl的example中femnist例子时报错 #230

Open izttt opened 3 years ago

izttt commented 3 years ago

安装的是官方给的docker镜像。 docker pull paddlepaddle/paddlefl:1.1.2 docker run --name --net=host -it -v $PWD:/paddle /bin/bash

进入后来到例子下的目录,输入以下命令,报错 [root@kuboard-slaver femnist_demo]# python3 fl_master.py get_pserver_program() is deprecated, call get_pserver_programs() to get pserver main and startup in a single call.

izttt commented 3 years ago

在4个worker节点中也就是trainer0~3输出的日志是: Traceback (most recent call last): File "fl_trainer.py", line 15, in from paddle_fl.paddle_fl.core.trainer.fl_trainer import FLTrainerFactory File "/usr/local/python/lib/python3.8/site-packages/paddle_fl/paddle_fl/core/trainer/fl_trainer.py", line 22, in import paddle_serving_client.io as serving_io ModuleNotFoundError: No module named 'paddle_serving_client'

pengbc917 commented 2 years ago

请问,你解决了这个问题嘛?

pengbc917 commented 2 years ago

paddle_serving_client 是一个库,使用 pip3 install paddle-serving-client==0.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 安装就可以了。 将 fl_trainer.py 的最后一行 trainer.save_inference_program(output_folder) 改成 trainer.save_inference_program(save_dir),运行后。就能在output_folder保存每个 epoch 的模型,否则会被覆盖。