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

Split hivemind.client into hivemind.averaging and hivemind.moe #304

Merged
merged 9 commits into from
Jul 3, 2021

Conversation

mryab
Copy link
Member

@mryab mryab commented Jul 2, 2021

This PR refactors the hivemind.client module, since it contains two different functionalities: Mixture-of-Experts client code and decentralized averaging. To properly separate the responsibilities of these classes, I moved them to hivemind.averaging and hivemind.moe (also putting the server under the same directory).

Also, to prepare for #275, I slightly removed the number of wildcard imports and modules with class definitions in __init__

@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #304 (be17da5) into master (200fbec) will increase coverage by 0.41%.
The diff coverage is 95.34%.

@@            Coverage Diff             @@
##           master     #304      +/-   ##
==========================================
+ Coverage   81.63%   82.05%   +0.41%     
==========================================
  Files          63       65       +2     
  Lines        5866     5856      -10     
==========================================
+ Hits         4789     4805      +16     
+ Misses       1077     1051      -26     
Impacted Files Coverage Δ
hivemind/averaging/group_info.py 100.00% <ø> (ø)
hivemind/averaging/load_balancing.py 95.91% <ø> (ø)
hivemind/averaging/partition.py 98.01% <ø> (ø)
hivemind/hivemind_cli/run_server.py 0.00% <0.00%> (ø)
hivemind/moe/client/expert.py 96.49% <ø> (ø)
hivemind/moe/server/expert_uid.py 69.64% <0.00%> (ø)
hivemind/moe/server/layers/lr_schedule.py 100.00% <ø> (ø)
hivemind/moe/server/task_pool.py 43.16% <ø> (ø)
hivemind/optim/base.py 71.42% <ø> (-1.30%) ⬇️
hivemind/p2p/p2p_daemon.py 91.18% <ø> (-0.07%) ⬇️
... and 41 more

Copy link
Member

@justheuristic justheuristic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please fix the docs before merging (see comment) (already fixed)

If you have no strong preferences, let's merge #298 ahead of this this

@mryab mryab marked this pull request as ready for review July 3, 2021 10:32
@mryab mryab requested a review from yhn112 July 3, 2021 10:33
Copy link
Member

@yhn112 yhn112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no conceptual problems
Unfortunately, can't visually check if something was missed =)

justheuristic and others added 2 commits July 3, 2021 18:11
# Conflicts:
#	benchmarks/benchmark_dht.py
#	benchmarks/benchmark_throughput.py
#	hivemind/averaging/training.py
#	hivemind/hivemind_cli/run_server.py
@mryab mryab merged commit 5233b6c into master Jul 3, 2021
@mryab mryab deleted the refactor_client branch July 3, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants