Skip to content

Data Race Between API Taxonomy and Annotation View #7262

@JackStouffer

Description

@JackStouffer

Describe the bug

When using a Taxonomy in labeling mode driven by an external API, it is possible for a data race to occur between the API load time and the rendering of the existing annotations list and details sections. If the taxonomy API takes a long time to load (generally longer than a second) then the UI will draw the list of existing annotations on the right of the screen with no labels at all. It will simply have the selected text, the id of the annotation, and the taxonomy path.

Further, once the Taxonomy has loaded, if you scroll up and down the list of annotations, once a annotation record is redrawn, it suddenly has the correct information.

To Reproduce

Steps to reproduce the behavior:

  1. Create a taxonomy control tag in labeling mode driven by an external api
  2. In the API, add something like a sleep call to make it take 5 seconds for the API to return
  3. Label a section of some text with a taxonomy record
  4. Save the annotation
  5. Reload
  6. You should see in the right hand annotation details view that the taxonomy label is not included in the annotation record

Expected behavior

The UI should wait to render until the Taxonomy API returns. I believe this is already the behavior for HyperText elements.

Screenshots

With data race where the annotation details view won

Image

With data race where the taxonomy API won

Image

Blacked out a lot of the text as this is proprietary company info

Environment (please complete the following information):

  • Browser: Chrome
  • OS: macOS
  • Label Studio Version 1.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions