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

[ENH] Rendezvous hashing support replication #2969

Merged
merged 3 commits into from
Oct 29, 2024
Merged

Conversation

HammadB
Copy link
Collaborator

@HammadB HammadB commented Oct 17, 2024

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • /
  • New functionality
    • Adds support for multiple assignment in HWRH. This works by taking the top-K scores instead of the top 1

Test plan

How are these changes tested?
Added a test for uniformity

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

None

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Collaborator Author

HammadB commented Oct 17, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @HammadB and the rest of your teammates on Graphite Graphite

@HammadB HammadB marked this pull request as ready for review October 29, 2024 23:43
max_member = member
score = -hasher(member, key)
# Invert the score since heapq is a min heap
heapq.heappush(member_score_heap, (score, member))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this could be made bounded but given small member count its probably fine

@HammadB HammadB merged commit 330e0d4 into main Oct 29, 2024
71 checks passed
HammadB added a commit that referenced this pull request Oct 30, 2024
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- One can view the assignment as a binomial distribution. We can take
the std dev of the binomial to validate the null hypothesis - that our
data is a binomial distribution.
- As @Sicheng-Pan pointed out
(#2969 (comment))
the previous tolerance to the multi-assign test should have failed. It
did not. Sometimes math disagrees with simulation. We were still in two
sigma with a tolerance of 75, now the tolerance is 150.
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
codetheweb pushed a commit that referenced this pull request Nov 5, 2024
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - /
 - New functionality
- Adds support for multiple assignment in HWRH. This works by taking the
top-K scores instead of the top 1

## Test plan
*How are these changes tested?*
Added a test for uniformity
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
codetheweb pushed a commit that referenced this pull request Nov 5, 2024
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- One can view the assignment as a binomial distribution. We can take
the std dev of the binomial to validate the null hypothesis - that our
data is a binomial distribution.
- As @Sicheng-Pan pointed out
(#2969 (comment))
the previous tolerance to the multi-assign test should have failed. It
did not. Sometimes math disagrees with simulation. We were still in two
sigma with a tolerance of 75, now the tolerance is 150.
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
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