Expose TSNE.n_iter_ fitted attribute#7142
Merged
rapids-bot[bot] merged 4 commits intorapidsai:branch-25.10from Aug 29, 2025
Merged
Expose TSNE.n_iter_ fitted attribute#7142rapids-bot[bot] merged 4 commits intorapidsai:branch-25.10from
TSNE.n_iter_ fitted attribute#7142rapids-bot[bot] merged 4 commits intorapidsai:branch-25.10from
Conversation
betatim
approved these changes
Aug 27, 2025
Member
betatim
left a comment
There was a problem hiding this comment.
Looks reasonable to me. I think having the plumping here is sensible, even if it doesn't seem needed.
My one review comment is more for my education/asking why we have all this templating if the types are anyway fixed (YAGNI)
viclafargue
reviewed
Aug 28, 2025
Contributor
viclafargue
left a comment
There was a problem hiding this comment.
LGTM! Just one comment.
dantegd
approved these changes
Aug 29, 2025
Member
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This:
n_iter_as a fitted attribute ofTSNE. This should be an integer between 0 andn_iter(the maximum number of iterations supported), and represents the number of iterations the algorithm actually ran for.TSNE.n_iter_throughcuml.accel.A couple notes:
barnes_hut) do have an early stopping condition. I still think exposing this this way is good (rather than just assuming max iterations and doingself.n_iter_ = self.n_iter) since it leaves plumbing in place in case the early stopping criteria changes (or there are cases where we do succeed in stopping early).TSNE.n_iter_pass, since the other failing tests aroundn_iter_were also related to the exact logging message shown to the user. I think that's fine.Fixes #6857