-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IPFS integration #35
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
==================================
Coverage 86% 86%
==================================
Files 3 3
Lines 167 167
==================================
Hits 144 144
Misses 23 23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can you please add test for it..
I'm not really sure how to write a proper test here. I setup the IPFS settings to just use the same defaults as Hivemind itself, so by default - nothing has changed. I would have written a full test for multiple peers over the IPFS network - but the existing one is marked as Anyway, I also couldn't get this project to install on Arch Linux (failures with grpcio-tools), so I had to use a Docker environment for the testing. You can build the image with I also added a couple more relevant settings. |
I also updated Hivemind to its latest version. It seems to be passing all tests, and it's working well in my limited production testing. |
Before submitting
Implements the
use_ipfs
argument, as documented here.IPFS nodes will not respond to ping in the way Hivemind expects, so we also set
ensure_bootstrap_success
to False, when IPFS is used. Nevertheless, HivemindStrategy will connect to peers successfully once training begins.Also added the
bootstrap_timeout
andwait_timeout
arguments. Because theinitial_peers
format for IPFS omits the IP address (/p2p/XYZ123...), we need to set these higher, to allow IPFS time to connect. Else, 90% of attempts to join an IPFS-bootstrapped swarm will fail.