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

feat: Support for top-k value matches #80

Merged
merged 8 commits into from
Nov 8, 2024
Merged

Conversation

roquelopez
Copy link
Collaborator

It is related to issue #61.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@roquelopez roquelopez changed the title WIP: feat: Support for top-k value matches feat: Support for top-k value matches Aug 7, 2024
@roquelopez roquelopez force-pushed the top_value_matches branch 6 times, most recently from f7048cd to 1fcfe8f Compare August 22, 2024 23:36
@roquelopez roquelopez requested a review from aecio September 6, 2024 14:40
Copy link
Member

@aecio aecio left a comment

Choose a reason for hiding this comment

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

I'm still taking a look at this in detail, but I think we need to add unit tests for the top_value_matches() API.

@roquelopez
Copy link
Collaborator Author

I overlooked adding the test but will do so shortly, thanks!

Copy link
Member

@aecio aecio left a comment

Choose a reason for hiding this comment

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

@roquelopez I made a few minor changes and commited the notebook/code. Feel free to merge when you review.

Comment on lines +317 to +321
if "top_n" in method_args and method_args["top_n"] > 1:
logger.warning(
f"Ignoring 'top_n' argument, use the 'top_value_matches()' method to get top-k value matches."
)
method_args["top_n"] = 1
Copy link
Member

Choose a reason for hiding this comment

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

Instead of top_n, what about we use top_k to be consistent with other function parameters?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done , thanks!

@roquelopez roquelopez merged commit 8352db1 into devel Nov 8, 2024
14 checks passed
@roquelopez roquelopez deleted the top_value_matches branch November 11, 2024 22:14
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