Add ItemMatch + ItemNoMatch Descriptors#1338
Conversation
|
Hi @jon-bown , I ran an example based on your pytest for ItemMatch descriptor and it failed with TypeError, could you please take a look? Here is an example: |
Hi @emeli-dral, I was also seeing this in my unit tests but didn't realize it was related to the data definition not handling list types in the input data. I've added some type handling to the data_preprocessing.py file, let me know what you think? |
|
First of all, I apologise for the delay. To resolve this, I suggest the following changes: 1/ Change from List to Tuple: 2/ Revert Changes in data_preprocessing.py: Thus we will expect users to explicitly create an item as a tuple rather than a list, which is a reasonable requirement. I'll make sure that this expectation is clearly documented for users. Many thanks for your work on this! |
I've reverted the |
|
Hi @jon-bown, I took a look at the error, and luckily it’s a very minor issue! The error occurs during the generation of the display_name in the following section of the code: The issue arises with To resolve this, I recommend simplifying the default_display_name to something like "Text contains defined items" and "Text does not contain defined items". Additionally, I think the same fix could work for the other issue. How about using "Text contains defined words" and "Text does not contain defined words"? Once these changes are made, we should be good to merge your PRs. Feel free to also add the new descriptors to the list of descriptors under the Text Evals heading on the documentation page. Thanks again for your contributions! |
|
Hi @emeli-dral Thanks for catching that, I've updated the |
|
Hi @jon-bown, Thanks a ton for all your hard work on this PR! You've done an awesome job, and your efforts have really paid off. I appreciate the attention to detail and how smoothly you handled everything. Excited to merge this in! |
|
Thanks for the contribution @jon-bown ! 🚀 |
Implement ItemMatch, ItemNoMatch, descriptor + feature and associated unit tests.
Resolves issue #1311
Resolves issue #1310