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

[Rating] defaultValue not working #6557

Open
mspronesti opened this issue Oct 25, 2024 · 1 comment
Open

[Rating] defaultValue not working #6557

mspronesti opened this issue Oct 25, 2024 · 1 comment

Comments

@mspronesti
Copy link

mspronesti commented Oct 25, 2024

According to the docs, defaultValue should preset Rating's value. It does not seem to work though.

playground example.

@heidi-humansignal
Copy link
Collaborator

heidi-humansignal commented Oct 30, 2024

Hello,

Thank you for bringing this issue to our attention. After reviewing your report, we've confirmed that this is indeed a bug. We have submitted the issue to our engineering team for further investigation. Please note that our team prioritizes bugs based on impact and how they align with our current roadmap, so we can't provide an exact timeline for a fix at this time. However, we’ll keep you updated as we make progress and will notify you once work begins and when the fix is delivered.
Thank you for your patience.

Here is workaround as well:

To set a default rating value, you can use pre-annotations in your task data. Pre-annotations allow you to provide initial annotation results that will be loaded when the task is opened.

Here's how you can modify your task data to include a pre-annotation for the rating:

Modify Your Task Data:

Add an annotations field to your task JSON that includes the initial rating value.

{
  "data": {
    "image": "path_or_url_to_your_image"
  },
  "annotations": [
    {
      "result": [
        {
          "from_name": "rating",
          "to_name": "image",
          "type": "rating",
          "value": {
            "rating": 4
          }
        }
      ]
    }
  ]
}

Replace "path_or_url_to_your_image" with the actual path or URL to your image.

Adjust Your Labeling Configuration:

You can keep your labeling configuration as is, using the correct attribute names:

<View>
  <Image name="image" value="$image"/>
  <Rating name="rating" toName="image" defaultvalue="4" icon="fire" size="large" />
</View>

Note that while defaultvalue="4" is correctly specified, due to the current implementation, it won't set the initial rating. The pre-annotation in the task data is necessary.

Thank you,
Abu

Comment by Abubakar Saad
Workflow Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants