Can't change view_id setting when using prodigy mark

I’m trying to use prodigy mark with a JSONL file that’s formatted for a choice task. I can’t seem to override the automatic view_id using the --view-id flag from the command line, though. If my task includes a span field, it defaults to ner, and if I exclude the field, it defaults to text. I can’t get it to display choice, though. Any ideas?

Each line in the JSONL looks like this:

{'options': [{'id': 1,
    'text': '"Aleppo", a seat of a first-order administrative division in SYR, id: 170063'},
   {'id': 2,
    'text': '"Aleppo Governorate", a first-order administrative division in SYR, id: 170062'},
   {'id': 3, 'text': '"Qal‘at Ḩalab", a historical site in SYR, id: 7674792'},
   {'id': 4, 'text': 'None/Other/Incorrect'}],
  'spans': [{'end': 83, 'start': 77}],
  'text': 'Hundreds of persons allegedly were arrested in the cities of Damascus, Hama, Aleppo, and Homs.'}

Thanks for the report! If a view_id is set manually, it should always have precedence over the auto-detection. I was already going over the front-end logic and suspecting a bug there, but it turns out this was due to a stupid typo :sob:

In recipes/ on line 58 it says 'view': view_id – but it should be 'view_id': view_id. Sorry about that. I’ve already fixed it in for the next release – in the meantime, just changing it manually should do the trick.

1 Like

Thanks for the response! I changed that line and I’m still running into the same issue. Maybe it’s a problem on my end with how I’m dealing with the .whl file.

Here’s what I’m doing:

  1. decompressing the .whl to a directory
  2. making the change to recipes/
  3. zipping up the directory again
  4. renaming the .zip with the full name of the old .whl
  5. pip install or pip install --force-reinstall the new .whl file.

Does something I’m doing you strike you as wrong? Thanks for any help!

Hmmm… in theory, this should work. And if it doesn’t it’d usually fail to install in the first place. So I’m not sure if it’s the wheel stuff (which is always tricky, so you never know), or if there’s another problem with the recipe.

Can you try find the file in your site-packages within the installed package and update it there? This should definitely work and will let you verify that it’s indeed that one line in the recipe.

Thanks and sorry again about the bug!

That solved it! Thanks!

(For anyone who comes after, the easiest way to find the installation location of prodigy is this:

import prodigy
1 Like