You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to support both valueTypes for my labeling interface since I'm receiving tasks that can either be an s3 path to a text file, or just text. so my tasks will look like this:
This works correctly for the text_url task files. But displays URL() not valid for text task files. Which means it doesn't find text_url field in my task.json and either passes an empty string or "None" or something like that and interprets it as a wrong URL.
Is it possible to either check for which field is present and go with that? Or just ignore text_url if it's not valid? Even though the second option will prevent me from seeing any relevant errors linked to a genuinely invalid URL.
The text was updated successfully, but these errors were encountered:
You probably have to preprocessing your task data so that all tasks use the same data field or you can have some sort of value in text_url field. It be just python script that will fill out the fields as necessary before importing them into LS
Thanks, however on the UI I have this text: "To select which field(s) to label you need to upload the data. Alternatively, you can provide it using Code mode." This leads me to think I can use multiple fields. Isn't it possible to just ignore the url error? I want to avoid preprocessing for this. Since it involves creating an endpoint accessible by my label studio container which returns 200 and an empty body every time.
You could use multliple fields, but the data should be presented in Labeling template. For example, based on the option you choose in choices, you can have other options become available. You can checkout conditional template in playground. As long as you include both of values in the json and can set one of them blank:
{ "data": { "text": "This is some inline text, do not worry", "text_url": "" }}
This will work. But if one of the value is missing, it should throw an error.
I'm trying to support both valueTypes for my labeling interface since I'm receiving tasks that can either be an s3 path to a text file, or just text. so my tasks will look like this:
Or this:
Here is my labeling interface:
This works correctly for the
text_url
task files. But displays URL() not valid fortext
task files. Which means it doesn't findtext_url
field in my task.json and either passes an empty string or "None" or something like that and interprets it as a wrong URL.Is it possible to either check for which field is present and go with that? Or just ignore text_url if it's not valid? Even though the second option will prevent me from seeing any relevant errors linked to a genuinely invalid URL.
The text was updated successfully, but these errors were encountered: