Skip to content

Conversation

@jfdreis
Copy link
Contributor

@jfdreis jfdreis commented May 20, 2025

No description provided.

@jfdreis jfdreis force-pushed the feat/benches-pipeline branch from 3195a42 to 8dd122f Compare May 20, 2025 22:32
Copy link
Contributor Author

@jfdreis jfdreis left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Python Benchmark with pytest-benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 233b835 Previous: 7b76880 Ratio
benchmarks/test_rag.py::test_rag_pedantic 0.12853314014631542 iter/sec (stddev: 0.03930125145461016) 0.16664327083853855 iter/sec (stddev: 0.06262404233228976) 1.30

This comment was automatically generated by workflow using github-action-benchmark.

@jfdreis jfdreis force-pushed the feat/benches-pipeline branch 2 times, most recently from 3bc980b to 6a19d9c Compare May 26, 2025 16:22
@jfdreis jfdreis marked this pull request as ready for review May 26, 2025 17:39
@jfdreis jfdreis requested review from a user and manel1874 May 26, 2025 17:41
@jfdreis
Copy link
Contributor Author

jfdreis commented May 27, 2025

Summary:

Add RAG performance benchmark to CI pipeline using pytest-benchmark and github-action-benchmark.

Description:
This introduces a new performance benchmark (benchmarks/test_rag.py) and integrates it into workflow (.github/workflows/ci.yml).
The benchmark measures the execution time of the rag.top_num_chunks_execute function.

Key aspects:

  • New Benchmark File: Adds benchmarks/test_rag.py containing the benchmark implementation.
  • CI Integration: Modifies the CI workflow to run this benchmark on every pull request and push to main.
  • Performance Tracking: Utilizes the github-action-benchmark to track performance changes over time and display results on the gh-pages branch. The benchmark performance graph is here.
  • Regression Alerting: Configures the benchmark action to fail the CI pipeline and post a comment on the PR if the top_num_chunks_execute function's execution time increases by more than 2% compared to the previous commit.
  • Non-Clustered Data: This specific benchmark is configured to test the non-clustered case of RAG execution. Later on we will update this to included a clustered case.
  • Dataset Size: The benchmark runs against a test dataset which contains 1000 paragraphs.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would put this .env.ci file inside .github/workflows. I believe you only need to adjust the ci file from below.

- name: Set up environment
run: |
cp .env.ci .env
Copy link
Contributor

Choose a reason for hiding this comment

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

In case you move .env.ci into .github/workflows:

Suggested change
cp .env.ci .env
cp .github/workflows/.env.ci .env

@jfdreis jfdreis force-pushed the feat/benches-pipeline branch 4 times, most recently from 6cf64a1 to f192e6d Compare May 29, 2025 23:14
@jfdreis jfdreis force-pushed the feat/benches-pipeline branch from f95c210 to 92e1c05 Compare May 30, 2025 09:26
@jfdreis jfdreis merged commit 96d8f3e into main May 30, 2025
1 check passed
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