-
Notifications
You must be signed in to change notification settings - Fork 403
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
[FEATURE] Add metadata field to the FeedbackRecord #3155
Comments
Fully agree with this @tugot17. This is already planned and your use case could greatly help us design and implement this. Some feedback from your side would be super helpful. For other tasks, we have But for the Feedback task we're considering some more fine-grained alternatives:
A canonical use case for Another is to keep a prompt id across different records, to split the ranking problem into several records: For prompt id = 1234 I create several records with pairs of responses, instead of just one asking the user to rank several pairs at the same time. |
The first option seems to be a much quicker fix, though it would introduce two different views for admins and for annotators, which would introduce the addional uncessery complexity. Why not just add |
Yes, sorry for the first option I meant adding a property |
As discussed, I think we could start with a new boolean attribute
What do you think @frascuchon , @gabrielmbmb , @alvarobartt , @keithCuniah ? |
I guess the fields that aren't visible shouldn't be searchable using the search bar once we have it, right? |
I think at least at the beginning we can assume that. As we discussed the other day and confirmed with @tugot17, having a way to store additional fields is crucial for many use cases, so we should include the minimum, simplest solution as soon as possible and then maybe iterate on more complex use cases |
Yes, I think allowing hiding some fields or even removing from the record itself from some endpoints can be a first approach to this metadata solution. Regarding the search, in general terms, I would say that visible/non-visible should be decoupled from the search accessibility (maybe make sense to search on non-visible fields from admins to apply some kind of data processing). Maybe we can limit search capabilities from the UI, but I think we should index the data for search. |
I agree, let's go with a simple solution to solve the non-visible fields and then will see further use cases (search, etc.) |
Regarding the first solution, I feel confused with the I would say to define a for data in dataset:
rg.FeedbacRecord(
fields={"field1": data.pop("a"), "field2": data.pop("b")},
metadata={**data}
) Appart from this, we need to think about how to provide searchable info out of the record cards, but this can be tackled as a different problem. |
Sounds good! |
# Description This PR adds a new attribute called `metadata` to the `Record` of the `FeedbackDataset`. - A new `metadata` column/attribute has been added to the `Record` ORM class (a new column `metadata` will be added by the migration script generated by `alembic`) - All the endpoints in the API v1 listing records has been updated to return this new `metadata` column - The SDK has been updated to parse the `metadata` key returned by the API - The Python client has been updated so new records can be created including `metadata` Additionally, I've refactor some `if/else` conditions in some methods from the `FeedbackDataset` class. Closes #3155 **Type of change** - [x] New feature (non-breaking change which adds functionality) - [x] Refactor **How Has This Been Tested** Unit tests has been updated and I've done some manual tests. **Checklist** - [x] I have merged the original branch into my forked branch - [ ] I added relevant documentation - [x] follows the style guidelines of this project - [x] I did a self-review of my code - [x] I made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --------- Co-authored-by: Alvaro Bartolome <alvaro@argilla.io>
Add support for adding metadata to the FeedbackRecord.
Currently, when pushing the records to the dataset, I can only push the fields that are later used as a
TextField
. In some scenarios, I would like to push not only the values but also the metadata, e.g., the hash values associated with different fields. They come in handy when analysing the results after the labelling is completed. I'm aware of theexternal_id
but in many use cases it is not sufficient.The solution would be to either:
TextField
.metadatafield
param that would capture such fields.The code:
The exception
The text was updated successfully, but these errors were encountered: