Skip to content

changing tuning match queries to return iterators#465

Merged
ericbuckley merged 4 commits into
mainfrom
qa/456-create-pairs-with-generators
Jul 16, 2025
Merged

changing tuning match queries to return iterators#465
ericbuckley merged 4 commits into
mainfrom
qa/456-create-pairs-with-generators

Conversation

@ericbuckley

@ericbuckley ericbuckley commented Jul 11, 2025

Copy link
Copy Markdown
Collaborator

Description

Modify the two functions in mpi_service that return true-match and non-match pairs to be iterators. We have the potential of reducing our memory footprint by 85% if we don't store the pairs.

Related Issues

refs #456

Additional Notes

This will not resolve #456, this is just the first step of a few to get us there. There will be follow-up steps to change the prob_calc functions to accept iterators and then eventually one to change tuning/base.py::tune to process the data as iterators.

Apologies, but a lot of the changes within are just formatting changes. My editor automatically runs ruff format when I save.

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@ericbuckley ericbuckley self-assigned this Jul 11, 2025
@codecov

codecov Bot commented Jul 11, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 98.46%. Comparing base (d423546) to head (2bf6ab8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/recordlinker/database/mpi_service.py 89.65% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #465      +/-   ##
==========================================
- Coverage   98.57%   98.46%   -0.12%     
==========================================
  Files          41       41              
  Lines        2394     2407      +13     
==========================================
+ Hits         2360     2370      +10     
- Misses         34       37       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ericbuckley ericbuckley marked this pull request as ready for review July 11, 2025 20:02
Comment thread src/recordlinker/database/mpi_service.py Outdated
Co-authored-by: Marcelle <53578688+m-goggins@users.noreply.github.com>
@m-goggins m-goggins self-requested a review July 15, 2025 15:03
@ericbuckley ericbuckley merged commit 40bc948 into main Jul 16, 2025
15 checks passed
@ericbuckley ericbuckley deleted the qa/456-create-pairs-with-generators branch July 16, 2025 00:48
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.

Reduce tuning memory used

3 participants