Skip to content

Conversation

@tm91236
Copy link
Member

@tm91236 tm91236 commented Nov 21, 2025

PR Type

  • Bugfix
  • Tests

Description

Closes #1086

How Has This Been Tested?

Adds a test to verify that kt_half_recursive behaves as expected. Previously, kt_half_recursive would return a list of identical coresets, rather than a recursive split.

Does this PR introduce a breaking change?

No.

Checklist before requesting a review

  • I have made sure that my PR is not a duplicate.
  • My code follows the style guidelines of this project.
  • I have ensured my code is easy to understand, including docstrings and comments where necessary.
  • I have performed a self-review of my code.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.
  • I have updated CHANGELOG.md, if appropriate.

Adds a test to verify that `kt_half_recursive` behaves as expected.
Previously, `kt_half_recursive` would return a list of identical
coresets, rather than a recursive split.

refs: #1086
@github-actions
Copy link
Contributor

Performance review

Commit 9f419ba - Merge f6124b9 into 004361f

No significant changes to performance.

The jit variant is applied to the cached and uncached reduce calls. This
more accurately captures expected invariant.
@github-actions
Copy link
Contributor

Performance review

Commit b7b3f47 - Merge d22a85e into 9e1197b

No significant changes to performance.

@github-actions
Copy link
Contributor

Performance review

Commit f632ab8 - Merge 9aa5522 into 9e1197b

Statistically significant changes

  • basic_herding:
    • OLD: compilation 1.121 units ± 0.04296 units; execution 0.08973 units ± 0.002242 units
    • NEW: compilation 1.117 units ± 0.0489 units; execution 0.1655 units ± 0.002391 units
    • Significant increase in execution time (84.41%, p=1.209e-23)
  • basic_rpc:
    • OLD: compilation 1.321 units ± 0.02443 units; execution 0.01994 units ± 0.0003137 units
    • NEW: compilation 1.291 units ± 0.03602 units; execution 0.05005 units ± 0.001364 units
    • Significant increase in execution time (151.02%, p=1.313e-14)
  • basic_stein:
    • OLD: compilation 5.059 units ± 0.2878 units; execution 0.3061 units ± 0.007958 units
    • NEW: compilation 5.126 units ± 0.4078 units; execution 0.7971 units ± 0.06428 units
    • Significant increase in execution time (160.41%, p=1.164e-09)

Normalisation values for new data:
Compilation: 1 unit = 277.21 ms
Execution: 1 unit = 478.83 ms

Copy link
Member

@gchqdev227 gchqdev227 left a comment

Choose a reason for hiding this comment

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

The tests look good, and the code changes definitely address the issue.

I've highlighted a line of code I don't think is tested in the changes. It's not a particularly complex case, but I could image it being refactored down the line in a way that undoes the improvements here?

@github-actions
Copy link
Contributor

Performance review

Commit 63cbb6a - Merge 330f64c into 9e1197b

No significant changes to performance.

@tm91236 tm91236 requested a review from gchqdev227 November 21, 2025 16:04
@tm91236 tm91236 merged commit 1883211 into main Nov 24, 2025
18 checks passed
@tm91236 tm91236 deleted the fix/kernel-thinning branch November 24, 2025 09:44
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.

KernelThinning does not seem to partition correctly

3 participants