Skip to content
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

Convert averager rpc_aggregate_part to P2P #188

Closed
3 tasks
justheuristic opened this issue Mar 20, 2021 · 1 comment
Closed
3 tasks

Convert averager rpc_aggregate_part to P2P #188

justheuristic opened this issue Mar 20, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@justheuristic
Copy link
Member

[this PR should be merged into libp2p branch]

Right now, the single heaviest communication pattern in hivemind is averaging model parameters with peers. This is currently done via AllreduceRunner in this RPC:
https://github.com/learning-at-home/hivemind/blob/master/hivemind/client/averaging/allreduce.py#L204

... called via this request method:
https://github.com/learning-at-home/hivemind/blob/master/hivemind/client/averaging/allreduce.py#L137

The main quest is to overhaul this method to work via P2P

  • create a test where two AllreduceRunners are manually created with two connected hivemind.P2P instances
  • call rpc_aggregate_part in allreduce patern, similarly to this test
  • test that it still works with large tensors (>10k values)

Since gRPC is not optimized for large messages, we slice these tensors into parts using split_for_streaming/combine_from_streaming. That said, P2P transport may not need this partitioning.

@justheuristic justheuristic added enhancement New feature or request help wanted Extra attention is needed labels Mar 20, 2021
@justheuristic justheuristic removed the help wanted Extra attention is needed label Mar 20, 2021
@borzunov
Copy link
Member

borzunov commented Aug 3, 2021

Solved in #323.

@borzunov borzunov closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants