HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
17.5k stars 2.17k forks source link

Add more info to python sdk parsed_label_config #3870

Open magicaltoast opened 1 year ago

magicaltoast commented 1 year ago

Is your feature request related to a problem? Please describe. parsed_label_config attribute does not provide all information about the tags. For example, in Choices tag we don't get information if the tag is required, visibleWhen, choice, etc.

This makes it hard or even impossible to programmatically do things with that information for example.

Use again Choices tag as an example in the auto machine learning use cases.

The only solution that I have in my mind is to parse the config by myself, but it defies the existence of parsed_label_config existence.

*Visual example**

Config Screenshot from 2023-03-19 11-54-20

Code

ls = Client(url="http://localhost:8080", api_key=accces_token)
project = ls.get_project(7)
print(project.parsed_label_config)

Result

Screenshot from 2023-03-19 11-54-44

Describe the solution you'd like Add all tags parameters to parsed_label_config

Describe alternatives you've considered Add only potentially useful tags parameters to parsed_label_config. Skip visual parameters like showInline

makseq commented 1 year ago

@magicaltoast parsed labeling config solves another task, it's not designed for things you describe. Yes, you have to parse labeling config manually, it should be accessible via project.label_config.