-
Notifications
You must be signed in to change notification settings - Fork 399
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] Order labels by confidence score #4647
Comments
Hey @nataliaElv! Great to see you diving into the depths of Argilla again 🌊. I remember our last tech adventure together! Hold tight, I'm checking out your latest quest for order in the label universe and will get back to you with some insights shortly. 🚀 |
Related to #3269 |
Based on the current implementation of Argilla, it is possible to customize the order of visible labels in a Here is an example of how you can use the (
{
"name": "a",
"title": "B",
"description": "b",
"required": False,
"labels": {"a": "A", "b": "B", "c": "C"},
"visible_labels": 3,
},
{
"name": "a",
"title": "B",
"description": "b",
"required": False,
"settings": {
"type": "multi_label_selection",
"options": [{"text": "A", "value": "a"}, {"text": "B", "value": "b"}, {"text": "C", "value": "c"}],
"visible_options": 3,
},
},
) In this example, the The This behavior is enforced through a root validator named You can find more details about this in the Argilla source code. Regarding your second point, the current implementation does not support keeping deselected labels visible. This would require a change in the Argilla codebase. I recommend creating a new issue for this feature request, detailing your use case and the desired behavior. This will allow the Argilla maintainers to evaluate the request and potentially include it in a future update. I hope this helps! If you have any other questions or need further clarification, feel free to ask. Sources
|
Until this implemented, a workaround (thanks @c23996 for the idea!) that allows users to access suggestions
is a bit crude, but in the end acceptable: we display suggestions (in the desired order) in a dedicated field and require users to confirm suggestions one by one by copying and pasting them from the text field. import argilla as rg
api_url = "http://localhost:6900"
api_key = "<api-key>"
rg.init(api_url=api_url, api_key=api_key)
# rg.Workspace.create('argilla')
rg.set_workspace("argilla")
num_labels = 250
labels = ["label " + str(i) for i in range(0, num_labels)]
dataset = rg.FeedbackDataset(
fields=[
rg.TextField(name="text", required= True, use_markdown=True),
rg.TextField(name="suggestions", required= True, use_markdown=True)
],
questions=[
rg.MultiLabelQuestion(name="question-multi", title="Which labels are correct?", labels=labels, required=True, visible_labels = 3)]
)
records = []
record = rg.FeedbackRecord(
fields={
"text": "tierra finamente dividida, constituida por agregados de silicatos de aluminio hidratados",
"suggestions": "label 28, label 34, label 53, label 14, label 95"
},
)
records.append(record)
dataset.add_records(records)
dataset.push_to_argilla(name="workaround-dataset", workspace="argilla") |
@nataliaElv I have two questions:
|
Hi @jfcalvo ! This won't apply for Span questions, only Label and Multilabel, and yes the idea is to make this a configuration at the question level that can be changed at any time. I'll send over more detailed specifications soon 🙂 |
Can I set the order of labels shown for examples in a FeedbackDataset with a MultiLabelQuestion for each individual example?
In a previous question, using code in #4615, I am using a FeedbackDataset to label examples with quite many labels.
After creating the dataset in Argilla, I get something like the screenshot below in the front-end, and there's a couple of things I would like to improve:
If I set the number of visible labels to (say) 10, the front-end always shows me the first elements in my list of labels (i.e. [labels[:10]]. These are (in general) irrelevant for the example to annotate, and they appear before the suggested labels, which instead are the ones likely to be fitting for my example. Is there a way to get rid of (= hide) these irrelevant labels, or at least show them after the suggested ones? At the moment it's impossible to hide them, as the minimum number of visible labels is 3.
In the same screenshot, if I deselect a suggested variable (say "label 53") it disappears instantly if it's not in labels[:10] , and I need to go back to the search box if I want to re-select it. Ideally instead, I would like suggested labels to still stay visible, even if they are deselected. In other words, suggested labels (in my example "label 28", "label 53", "label 14") should have "visual priority" - should come first and should stay visible even if unselected - over the irrelevant-if-not-suggested labels[:10] . Can I set the order of labels so that suggested labels come first and not disappear if unselected?
Summarizing, I would be happy if I could allow Argilla to order visible labels in a FeedbackDataset with a MultiLabelQuestion so that they can be displayed with a custom order, depending on the example, not the one dictated by the labels argument of the MultiLabelQuestion and stay visible if unselected. Is this feasible to do?
P.S. If I am not mistaken, this is somewhat related to #4638, but I don't care much about displaying the score, I care about ordering the labels according to the predicted score (i.e. suggested labels, with a high score, should be shown first).
Tasks
options_order
attribute on multi label question settings #4756The text was updated successfully, but these errors were encountered: