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

[BUG-UI/UX] SpanQuestion char level selection & emoji issues #4834

Closed
cceyda opened this issue May 15, 2024 · 2 comments · Fixed by #4836 or #4872
Closed

[BUG-UI/UX] SpanQuestion char level selection & emoji issues #4834

cceyda opened this issue May 15, 2024 · 2 comments · Fixed by #4836 or #4872

Comments

@cceyda
Copy link
Contributor

cceyda commented May 15, 2024

Describe the bug
@nataliaElv & @Amelie-V here is the example code for the issues I described in the demo call & some summary of the issues:

  • Char level selection works weirdly if there are no spaces and a number in the middle: "Apple10dollars"
  • Shift key pressed before starting the selection is ignored (so you have to click shift after selection starts but that auto removes other spans and is hard to work quickly)
  • Emoji issue from the older datasets([Bug] Token Classification emojis cause overlapping spans error & wrong annotations #2353) seems to still exist in SpanQuestion, i think the underlying cause is the same. If there is an emoji submit button freezes in a loop with the dev console message:
    {
        "detail": "span question response value `end` must have a value lower or equal than record field `text` length that is `18`"
    }
    

To Reproduce

import argilla as rg

rg.init()

labels = {
            "apple": "ABC",
            "banana": "DEF",
            "pear": "GHI",
            "strawberry": "JKL",
            "mango": "MNO",
            "orange": "PQR",
            "grape": "STU",
            "kiwi": "VWX",
            "pineapple": "YZ"
        }

dataset = rg.FeedbackDataset(
    fields= [ rg.TextField(name="text",required=True)],
    questions=[
        rg.SpanQuestion(
            name="entities",
            title="Labels:",
            labels=labels,
            field="text",
            required=True
        )],
    allow_extra_metadata=True
)
record = [
    rg.FeedbackRecord(fields={"text": "Apple 🥹 Pear 🦸🏻‍♀️"}),
    rg.FeedbackRecord(fields={"text": "Apple🥹Pear🦸🏻‍♀️banana🍌 test"}),
    rg.FeedbackRecord(fields={"text": "Apple10dollars"})
    ]
dataset.add_records(record)
dataset.push_to_argilla(name="debug_spans")

Environment (please complete the following information):

  • Browser [e.g. chrome, safari]: chrome (but also shortly tested in safari and had the same issues)
  • Docker Image: argilla: v1.28
@nataliaElv
Copy link
Member

Thanks @cceyda ! We'll look into this 😄 cc @damianpumar

@nataliaElv
Copy link
Member

@burtenshaw I tried to translate the script above to the new SDK and there seems to be an error when passing the dictionary of labels in the SpanQuestion. Is this expected?

@damianpumar damianpumar linked a pull request May 15, 2024 that will close this issue
@damianpumar damianpumar linked a pull request May 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants