Skip to content
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

Refactor coreset classes #943

Merged
merged 18 commits into from
Feb 6, 2025
Merged

Refactor coreset classes #943

merged 18 commits into from
Feb 6, 2025

Conversation

rg936672
Copy link
Contributor

@rg936672 rg936672 commented Jan 31, 2025

PR Type

  • Refactoring

Description

Refactor Coreset and Coresubset(Coreset) into AbstractCoreset, PseudoCoreset(AbstractCoreset), and Coresubset(AbstractCoreset).

Also splits out .nodes into .indices and .points, and deprecates .coreset in favour of .points.

How Has This Been Tested?

Existing tests pass as expected. Pyright passes as well. We no longer need Pyright ignores in coreset.py (aside from in parts of the code that are deprecated).

Does this PR introduce a breaking change?

Yes, but deprecated aliases are added, so old code should still work. See the additions to the Deprecated section of CHANGELOG.

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.

@rg936672 rg936672 force-pushed the feature/coreset-refactor branch from 361f797 to 4317db0 Compare February 5, 2025 10:25
@rg936672 rg936672 added this to the v0.4.0 milestone Feb 5, 2025
Also improves the MapReduce tests to test three cases - a Coresubset
case, a PseudoCoreset that is a subset of the original points, and a
PseudoCoreset that is unrelated to the original points.
@rg936672 rg936672 force-pushed the feature/coreset-refactor branch from 1a4f8a4 to 4e3b4a4 Compare February 5, 2025 16:21
@rg936672 rg936672 force-pushed the feature/coreset-refactor branch from 4e3b4a4 to 84e2cfd Compare February 5, 2025 16:45
Copy link
Contributor

github-actions bot commented Feb 5, 2025

Performance review

Commit a5c5ab3 - Merge 84e2cfd into 16d8e62

No significant changes to performance.

@rg936672 rg936672 marked this pull request as ready for review February 5, 2025 17:05
@qh681248 qh681248 self-requested a review February 6, 2025 09:07
@rg936672 rg936672 mentioned this pull request Feb 6, 2025
9 tasks
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
@gchq gchq deleted a comment from github-actions bot Feb 6, 2025
coreax/coreset.py Show resolved Hide resolved
coreax/solvers/coresubset.py Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Feb 6, 2025

Performance review

Commit 31d3544 - Merge e8f19da into 16d8e62

No significant changes to performance.

@qh681248 qh681248 self-requested a review February 6, 2025 14:33
@qh681248 qh681248 merged commit 183ed42 into main Feb 6, 2025
23 checks passed
@qh681248 qh681248 deleted the feature/coreset-refactor branch February 6, 2025 15:02
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