Repository navigation
resolves #2 incorporate top k - #3
Merged
Merged
Conversation
Closed
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 pull request updates the
NodeMappertutorial, core implementation, and tests to improve usability and flexibility when finding similar text nodes. The main changes include enhancing theget_similarmethod to support returning the top-k matches, updating tutorial data and outputs for clarity, switching from print to logging for model loading, and improving test coverage for the new features.Enhancements to
NodeMapperfunctionality:top_kparameter to theget_similarmethod inhugger/mapper.py, allowing users to specify the number of top similar items to return. This includes input validation and updated docstrings/examples. [1] [2] [3] [4] [5]get_similarandget_matchto 0, making it easier to retrieve results without filtering by a minimum score. [1] [2] [3]Usability and output improvements:
hugger/mapper.pyfor better integration in various environments. [1] [2]Tutorial and example updates:
nodemapper-tutorial.ipynbandnodemapper-tutorial.pyto use longer, more realistic sentences and additional entries, improving the clarity and usefulness of the tutorial. [1] [2]top_kparameter, and use more descriptive queries and thresholds. [1] [2] [3] [4]Testing improvements:
tests/test_mapper.pyto cover the newtop_kfunctionality, renamed test functions for clarity, and adjusted assertions to match the updated logic and data. [1] [2]Miscellaneous:
These changes collectively make the
NodeMappermore flexible and user-friendly, with improved documentation, examples, and test coverage.