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

Averager: update group keys #141

Merged
merged 24 commits into from
Jan 20, 2021
Merged

Averager: update group keys #141

merged 24 commits into from
Jan 20, 2021

Conversation

justheuristic
Copy link
Member

@justheuristic justheuristic commented Jan 19, 2021

  • DHT can now .get and .store
  • migrated get_averager/declare_averager from hivemind.dht.DHT to hivemind.client.averaging
  • averager will now switch group keys internally without the need for boilerplate code
  • averager will now dynamically change the number of bits if it encounters underpopulated or overcrowded groups
  • added a bunch of tests for the new functionality
  • fixed several minor issues with documentation and error messages

@justheuristic justheuristic marked this pull request as ready for review January 20, 2021 03:40
@mryab mryab changed the title Averager - update group keys Averager: update group keys Jan 20, 2021
@@ -519,69 +559,3 @@ async def _batch_find_best_experts(
if future is not None:
future.set_result(best_experts_batch)
return best_experts_batch

Copy link
Member Author

Choose a reason for hiding this comment

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

note: declare/get averager were moved to hivemind.client.averaging

>>> update_model(tensors)
>>> tensors[0] += 1
>>> # do not use tensors after the lock is acquired
Usage example: see help(DecentralizedAverager)
Copy link
Member

Choose a reason for hiding this comment

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

We'd better remove that reference altogether or have a self-sufficient example

@justheuristic justheuristic merged commit 10917b2 into master Jan 20, 2021
@justheuristic justheuristic deleted the averager_grid branch January 20, 2021 14:50
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.

2 participants