-
Notifications
You must be signed in to change notification settings - Fork 555
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
Plumb metric
and metric_kwds
through to UMAP with nn_descent
#6304
base: branch-25.04
Are you sure you want to change the base?
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
f74bc23
to
e827f53
Compare
Previously we were erroneously missing this plumbing, leaving the `metric` and `metric_arg` as the defaults when `nn_descent` is used. In the long run we should redo how the parameters are passed when `nn_descent` is enabled to avoid this duplication, but for now fixing the plumbing to be more correct seems fine.
At least on my aarch64 linux box these aren't failing anymore.
e827f53
to
afcff55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased on main and marked ready for review.
umap_params.nn_descent_params.n_clusters = <uint64_t> build_kwds.get("nnd_n_clusters", 1) | ||
# Forward metric & metric_kwds to nn_descent | ||
umap_params.nn_descent_params.metric = <RaftDistanceType> umap_params.metric | ||
umap_params.nn_descent_params.metric_arg = umap_params.p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual fix is here (plumbing through the metric options to nn_descent_params
). In the long run we should redesign the C++ layer to remove duplicate options - for now just ensuring they're forwarded correctly seems sufficient.
Everything else here is a simplification of the current pre-existing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we would have to make sure that NN Descent is actually compatible with all the metrics we make available. cc @jinsolp
A quick browse through the code I believe all metrics are handled fine by The behavior before was incorrect ( Planning to merge once CI is green. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## branch-25.04 #6304 +/- ##
================================================
- Coverage 68.50% 67.34% -1.16%
================================================
Files 204 204
Lines 13194 13194
================================================
- Hits 9039 8886 -153
- Misses 4155 4308 +153 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Ah! Thanks @jinsolp! I'm curious - right now after plumbing the
Then whenever we get around to moving to |
Yes I think that would be great! : ) |
Previously we were erroneously missing this plumbing, leaving the
metric
andmetric_arg
as the defaults whennn_descent
is used. In the long run we should redo how the parameters are passed whennn_descent
is enabled to avoid this duplication (there's a few other uselessly exposed params likereturn_distances
), but for now fixing the plumbing to be more correct seems fine.On top of #6303, leaving as draft for now until that's merged.
Also re-enables tests on ARM, fixes #5441.