No update to interface after changing relationHeightWrap value in prodigy.json file

Good afternoon,

I was trying to modify the height of the spaces between the lines with the wrap in the relations interface (i am using the ner.manual). I found my prodigy.json file which was empty and changed it to:

{

"relationHeightWrap": 50

}

I also defined the PRODIGY_HOME to the directory in which my prodigy.json file is in. So I am not really understanding why when I run my script that does:

prodigy.serve('rel.manual dataset pt_core_news_sm ./input_file.jsonl -l ' + relations + ' --span-label ' + spans, host=h , port=p, show_flag=True)

the relationHeightWrap did not change. Could you tell me what I am doing wrong or what I might be forgetting to do?

Best regards,

Maria Duarte

Hi! The relationHeightWrap setting is a theme setting, so it should go under "custom_theme". So if you change your prodigy.json like this, it should work :slightly_smiling_face:

{
    "custom_theme": {
        "relationHeightWrap": 50
    }
}

Thank you for your reply! I wanted to change the height to make the lines in the text closer to each other. I did like you said, and it did change the height.

It change from this:

To this:

Each line in the text is now closer to each other (so the height became smaller), but for some reason the width of the box also changed. Is there a way to make the width the same as before, while the lines of the text stay with the smaller height?

Kind Regards,
Maria Duarte

Ah, sorry about this – this behaviour is definitely unintuitive! Prodigy doesn't currently deep-merge the theme settings, so in this case, overwriting the custom_theme setting also overwrote the recipe default, "cardMaxWidth": "90%".

So in your config, you can do:

{
    "custom_theme": {
        "relationHeightWrap": 50,
        "cardMaxWidth": "90%"
    }
}

We should probably just deep-merge the theme settings in the future to prevent this!

Hi - thanks for sharing this. Unfortunately, I'm getting the error

custom_theme extra fields not permitted

and my recipe config looks like

'custom_theme': {'cardMaxWidth': '95%'}

Hi @griff4692 , that's a bit unusual. Just to sanity-check, your config should look something like this (custom_theme is a key for the overall config dictionary):

config = {
    "custom_theme": {"cardMaxWidth": "95%"},
}