-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use both valueType text and url in labeling interface #6580
Comments
Hello, 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 Thank you,
|
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:
This will work. But if one of the value is missing, it should throw an error. Thank you,
|
This doesn't work, I get URL is invalid. If I insert a non valid URL(aka empty string). I get NetworkError, could not fetch resource. |
That seems like a issue. Would it be possible to try something like this:
Providing The only thing I would say, its having some default url or doing a preprocessing of the data. Thank you,
|
Great idea, however unfortunately I'm getting an invalid error: |
Yes, it seems we are going to need a PR for this. Another solution to be a test file in the storage and just link that as url. Its happening because there is validation logic that checks to make sure its proper url. Thank you,
|
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: