Code Monkey home page Code Monkey logo

iammcy / bflc-demo Goto Github PK

View Code? Open in Web Editor NEW
93.0 3.0 22.0 567 KB

This project proposes a decentralized federated learning framework based on blockchain, that is, a Block-chain-based Federated Learning framework with Committee consensus (BFLC). Without a centralized server, the framework uses blockchain for the global model storage and the local model update exchange.

License: MIT License

C++ 67.01% Shell 2.36% Solidity 1.63% Python 29.00%
federated-learning blockchain

bflc-demo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bflc-demo's Issues

配置python-sdk时出错

捕获

按步骤配置python-SDK后,输入python3 ./console.py getNodeVersion进行测试,出现上图错误,请问是什么原因,如何和解决

原理问题

您好,原论文中提到使用“两个不同的区块来存储全局模型和局部更新”,请问这部分内容体现在您代码中的哪个部分呢?还有您是怎么把奖励分配给相应的节点的?您在这个项目中如何选择的委员会成员?

cryptopp-error

image
[ 41%] Performing build step for 'cryptopp'
CMake Error at /home/ybs/FISCO-BCOS/deps/src/cryptopp-stamp/cryptopp-build-RelWithDebInfo.cmake:49 (message):
Command failed: 2

'/usr/bin/cmake' '--build' '/home/ybs/FISCO-BCOS/deps/src/cryptopp-build' '--config' 'Release'

See also

/home/ybs/FISCO-BCOS/deps/src/cryptopp-stamp/cryptopp-build-*.log

make[2]: *** [CMakeFiles/cryptopp.dir/build.make:86: ../deps/src/cryptopp-stamp/cryptopp-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:762: CMakeFiles/cryptopp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

in cryptopp-build-err.log

image

节点问题

请问训练节点上传的梯度参数,是传给共识中的领导节点了,还是传给共识中除了领导节点的剩余节点呀

代码疑问

楼主,请问一下,main中local_scoring函数是没有交叉验证的是吗?
若足够数量更新,则当前的委员会节点直接计分,若一个委员会计分数量达到聚合数,之后的委员会节点是不是就不再计分了?

使用的问题

跑demo的时候。会报如下错误,可以怎么解决呢?
另外,这个框架可以直接在main.py里面进行修改深度学习模型代码吗,还是需要修改相关的配置呢?
image

cmake ..编译问题

您好,在源码编译,第4步,出现了如下问题:
rpcheng@ubuntu:~/FISCO-BCOS/build$ cmake ..
CMake Error at CMakeLists.txt:44 (message):
The submodules were not downloaded! GIT_SUBMODULE was turned off or failed.
Please execute:

git submodule update --init

-- Configuring incomplete, errors occurred!

请问这是什么原因呢,以及如何解决
感谢

源码编译make -j4报错

操作系统:Ubuntu 20.04.1 LTS
FISCO-BCOS:2.7.2
根据README使用root用户一步步操作,working_dir=/root,执行make -j4的时候报错,请问改如何解决
2021-05-30_143755

运行main.py报错

a9a54c7569d243b6e1729b86941346d

老师您好,我在最后一步运行main.py的时候出现了这个报错。请问缺少/bin/logs是什么意思,该如何解决这个问题?

上面是我在~路径中执行时遇到的问题。在python-sdk路径下执行main.py报错如下:
image

委员会问题

您好,请问您的这个demo中,委员会成员一直是区块链上的四个节点吗?

编译的

HH5V8CDDPY1BP {U@7D_UK6
编译的过程出现这个问题

编译遇到的问题

~8NY1@35G{M(E@IZ}5BYK
ake[2]: *** 没有规则可制作目标“../deps//src/gperftools/.libs/libtcmalloc_minimal.a”,由“bin/fisco-bcos” 需求。 停止。
make[2]: *** 正在等待未完成的任务....
[ 97%] Building CXX object fisco-bcos/main/CMakeFiles/fisco-bcos.dir/main.cpp.o
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://github.com/gperftools/gperftools/releases/download/gperftools-2.7/gperftools-2.7.tar.gz'
^[^Amake[1]: *** [CMakeFiles/Makefile2:2106:fisco-bcos/main/CMakeFiles/fisco-bcos.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
-- Using src='https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/gperftools-2.7.tar.gz'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://github.com/gperftools/gperftools/releases/download/gperftools-2.7/gperftools-2.7.tar.gz'

the update of local model is not collected

image
image
收不到更新
而且用gpu跑的时候老显示Check failed: err == cudaSuccess || err == cudaErrorInvalidValue Unexpected CUDA error: out of memory
但我的gpu并没有被其他占用,只有跑main.py的时候才会出现out of memory的问题。型号是2080和论文一致。

编译出错

你好请问一下 在make j4时 发现CommitteePrecompiled.cpp.o出现了错误
Uploading image.png…

多机部署配置

作者你好,关于多机部署我有两个问题,期待回复,谢谢了!
Q1:每个区块链节点都要部署python-sdk吗?
Q2:<working_dir>/python-sdk/client_config.py中的remote_rpcurl与channel_host该如何配置?(我现在有五个节点)
8G@S88UI50Q1LT8S}U G(TD

似乎缺少文件

请问在“嵌入预编译合约”和“CmakeLists.txt设置”中,提到的CmakeLists.txt文件是我自己创建的还是该项目自带的?

求解答

老哥好,我这在执行编译的make -j4,下载成功后出错,不知道是什么意思,求解答
/usr/bin/ld.gold:错误: cannot find -l...
collect2: error: ld returned 1 exit status
make[2]: *** [fisco-bcos/main/CMakeFiles/fisco-bcos.dir/build.make:150:bin/fisco-bcos] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2225:fisco-bcos/main/CMakeFiles/fisco-bcos.dir/all] 错误 2
make: *** [Makefile:130:all] 错误 2

make -j4网络编译出错

[用了两种方法还是编译不了,编辑hosts文件和直接下载libs文件都不行,请问怎么回事呀]

编译问题

image

下面是cryptopp-build-err.log的报错信息:

jobserver 不可用: 正使用 -j1。添加 “+” 到父 make 的规则。
Error running link command: No such file or directory
gmake[5]: *** [cryptopp/CMakeFiles/cryptest.dir/build.make:434:cryptopp/cryptest] 错误 2
gmake[4]: *** [CMakeFiles/Makefile2:204:cryptopp/CMakeFiles/cryptest.dir/all] 错误 2
gmake[3]: *** [Makefile:146:all] 错误 2

运行main.py遇到的问题

image

之前运行main.py时候是正常的,然后我训练中途ctrl+c终止了,再运行出现了上述问题,请问如何解决呢

全局模型设计

您好,我看了您编写的CommitteePrecompiled.h文件中对于模型的定义,这个是原论文中使用的alexnet模型吗?请问这个预编译有推荐的教程么,对于预编译合约的编写您有什么建议么?谢谢!
image

编译问题

[100%] Linking CXX executable ../../bin/fisco-bcos
/usr/bin/ld.gold: error: cannot find -l...
collect2: error: ld returned 1 exit status
make[2]: *** [fisco-bcos/main/CMakeFiles/fisco-bcos.dir/build.make:150: bin/fisco-bcos] Error 1
make[1]: *** [CMakeFiles/Makefile2:2225: fisco-bcos/main/CMakeFiles/fisco-bcos.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

对着FISCO文档进行源码时成功了。
但是对着Github的步骤进行编译时就会报以上的错误。
欢迎讨论:q:82316637

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.