Skip to content

[TST] More benchmark queries for regex #4910

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 5 commits into from
Jul 7, 2025

Conversation

Sicheng-Pan
Copy link
Contributor

@Sicheng-Pan Sicheng-Pan commented Jun 21, 2025

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • This PR adds more regex patterns in the benchmark. The benchmark also serve as an integration for regex as it compares the result with bruteforce evaluation.
    • Updates a few dependencies. Verified that there should be no breaking change
    • Updates some wal3 test because fragment size changed after dependency. The existing fragment should be compatible and manifest should still be valid
  • New functionality
    • N/A

Test plan

How are these changes tested?

  • 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 section?

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
Contributor Author

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

@Sicheng-Pan Sicheng-Pan marked this pull request as ready for review June 21, 2025 00:12
Copy link
Contributor

propel-code-bot bot commented Jun 21, 2025

Expand Regex Benchmark Coverage and Update Dependencies

This PR significantly expands the regex and full-text search benchmark queries, using the bigcode/the-stack-dedup Rust dataset for more comprehensive and realistic benchmarks. It also updates a set of core dependencies (notably Arrow and Parquet to 55.1, with lockfile and cargo file adjustments), and adapts affected k8s WAL integration tests to new fragment sizes and manifest expectations following Arrow/Parquet upgrades. Additionally, a new dataset runner for the Rust dataset is implemented for more robust benchmarking.

Key Changes

• Substantially broadened regex and literal search benchmark patterns for more realistic evaluation, especially in rust/index/benches/literal.rs and rust/worker/benches/regex.rs
• Replaced homegrown Rust code dataset with streaming from HuggingFace bigcode/the-stack-dedup, implementing rust/benchmark/src/datasets/rust.rs
• Updated Arrow and Parquet workspace dependencies from 52.2.0/52 to 55.1, adjusted Cargo.toml and Cargo.lock accordingly
• Refactored benchmark code to use asynchronous, batched Parquet readers and a streaming approach; multiple bugfixes and cleanup for dataset utilities
• Adapted WAL integration tests (k8s) to account for different fragment sizes and stat expectations after Arrow/Parquet changes

Affected Areas

• Benchmarks: regex.rs, literal.rs
• Benchmark dataset utils: datasets/rust.rs, datasets/util.rs, Cargo.toml
• Dependency management: Arrow/Parquet in workspace
• Integration/test fixtures: wal3/tests for k8s, manifest checks
• Benchmark dataset registry: datasets/mod.rs

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

@Sicheng-Pan Sicheng-Pan requested a review from sanketkedia June 21, 2025 00:13
@Sicheng-Pan Sicheng-Pan force-pushed the sicheng/06-20-more-regex-bench branch from 4d57d3b to 99c96f1 Compare June 21, 2025 01:59
Copy link
Contributor

@sanketkedia sanketkedia left a comment

Choose a reason for hiding this comment

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

Discussed offline to babysit staging just to be safe that arrow version increment does not break old data

@Sicheng-Pan Sicheng-Pan merged commit 9bda3dc into main Jul 7, 2025
109 of 114 checks passed
Copy link
Contributor Author

Merge activity

@Sicheng-Pan Sicheng-Pan deleted the sicheng/06-20-more-regex-bench branch July 7, 2025 23:25
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
## Description of changes

_Summarize the changes made by this PR._

- Improvements & Bug fixes
  - This PR adds more regex patterns in the benchmark. The benchmark also serve as an integration for regex as it compares the result with bruteforce evaluation.
  - Updates a few dependencies. Verified that there should be no breaking change
  - Updates some wal3 test because fragment size changed after dependency. The existing fragment should be compatible and manifest should still be valid
- New functionality
  - N/A

## Test plan

_How are these changes tested?_

- [ ] 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 section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
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