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

Remove unnecessary warnings during KNN graph correction #1129

Merged
merged 1 commit into from
May 24, 2024

Conversation

elisno
Copy link
Member

@elisno elisno commented May 24, 2024

Summary

This PR is a direct follow-up to

It removes the unnecessary warning check for missing exact duplicates in the KNN graph correction process. The check ran separately from the correction algorithm and could slow down the process, while warning that a KNN graph was corrected.

Key Changes

  • Removed the _warn_missing_exact_duplicates function and the enable_warning parameter.
  • Updated the correct_knn_distances_and_indices function to exclude the optional warning check.
  • Deleted the corresponding test case for the warning.

Rationale

The separate check for missing exact duplicates is redundant in most use cases since the output is already corrected. By removing this check, we simplify the code and enhance the user experience with fewer unnecessary warnings and better performance.

Additionally, this warning would only trigger when constructing the KNN graph from scratch along with a correction step. The check is unnecessary and can be safely removed.

Impact

  • Improved performance in KNN graph correction.
  • Simplified codebase with reduced unnecessary checks.

The warning check for missing exact duplicates, which runs separately from the correction algorithm, has been removed. This check is often slower and redundant as the output is already corrected. By removing this check, we streamline the KNN graph correction process, enhancing performance for typical use cases where the check is unnecessary.
@elisno elisno added the trivial-change Simple updates with no core impact that allow for expedited review. label May 24, 2024
@elisno elisno merged commit 4388992 into cleanlab:master May 24, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trivial-change Simple updates with no core impact that allow for expedited review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant