Skip to content

[ENH] Fix 422 Unprocessable Entity error in Chroma Load #4537

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

rescrv
Copy link
Contributor

@rescrv rescrv commented May 13, 2025

Description of changes

If the bit-difference workload is used for pure-upsert workloads it will
violate quota. This PR shrinks the batch size to just one cluster at a
time. By construction clusters fit a batch.

Test plan

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

Documentation Changes

N/A

If the bit-difference workload is used for pure-upsert workloads it will
violate quota.  This PR shrinks the batch size to just one cluster at a
time.  By construction clusters fit a batch.
@rescrv rescrv requested a review from jasonvigil May 13, 2025 20:28
Copy link
Contributor

This PR fixes a quota violation in the bit-difference workload when used for pure-upsert operations. The solution reduces the batch size from multiple clusters to just one cluster at a time, ensuring clusters fit within batch limits.

This summary was automatically generated by @propel-code-bot

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)

Comment on lines +270 to +271
let num_this_cluster = (cluster.docs.len() as f64 * uq.associativity).ceil() as usize;
for _ in 0..num_this_cluster {
Copy link
Contributor

Choose a reason for hiding this comment

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

[CriticalError]

The loop iteration variable and batch size parameter uq.batch_size have been removed, but there's no check to ensure that enough documents are sampled to meet the original intent. If num_this_cluster is smaller than what would have been generated with multiple clusters in a batch, this could lead to fewer documents being processed than before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. That's my intent.

@rescrv rescrv merged commit ad1ac3d into main May 13, 2025
71 checks passed
@rescrv rescrv deleted the rescrv/chroma-load-bit-difference-upsert branch May 13, 2025 21:55
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