-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Core algorithms #87
Merged
Merged
Core algorithms #87
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bff8b76
to
d4c6a59
Compare
jeffchuber
approved these changes
Nov 26, 2022
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.
great
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces three core Chroma algorithms.
The change is in two parts:
There are 3 core algorithms:
There is also a random sampler, which should make up some proportion of the next dataset - 'every datum gets a chance'
All 3 algorithms get run over the entire unlabeled (inference) dataset, effectively scoring it by each. Then, for a specified number of total samples, we proportionally collect the best candidates from each.
Testing
Install the new requirements:
pip install -r requirements.txt
pip install -r requirements-dev.txt
There are two notebooks:
chroma_server/algorithms/core_algorithms_examples.ipynb
shows how each algorithm works separately.chroma_server/utils/sampling_examples.ipynb
shows how the algorithms are run, and how to get the final result.Future
In the long term, there is a lot to do - the following represent near-term things we should do soon, but don't block shipping.
#91 - Fix random sampling to be over images, not embeddings.
#92 - Add telemetry
#88 - Fix class-based representative sampling
#89 - Address redundant computations to make algos more efficient.
TODOS:
[x] Create celery task for background procesingdecided this is unimportant