Loading records via db-in aren't accepted


prodigy db-in myset myfile.jsonl (with and without --answer “accept”)

With new and pre-existing dataset.

records imported but not accepted.

Imported 56277 annotations for ‘myset’ to database SQLite
Added ‘accept’ answer to 0 annotations

Where record set contains answer: “accept”

myfile.jsonl contains structure -

{“text”: “blah blah blah”, “label”: “MYLABEL”, “meta”: {“source”: “myfile.jsonl”}, “answer”: “accept”}\n

Please advise.

Just to make sure I understand the question correctly: You have data that already has "answer" annotations, and you want to import only the accepted ones?

The --answer setting on db-in is intended to add an "answer" key – for example, if you want to import annotations created with a different tool and you want Prodigy to store them all as accepted. Since your examples already contain "answer": "accept", Prodigy will import them all, but won’t add the answer (because it’s already here).

You can use the following command to preview your set on the command line and see what Prodigy imported:

prodigy db-out my_set | less

Thank you for your timely response.

After performing the dump as you suggested, I can see that they were indeed imported with the accept flag, but I was expecting that to be reported on import. I can understand now that the "Added ‘accept’ answer to X annotations’ is reporting on how many records that the “answer” was added to - but since in this case they were already annotated no need to add that value.

That said, perhaps a slight modification to the output or documented examples would make it clearer to newcomers such as myself.

Imported x annotations for ‘myset’ to database …
Imported x annotations for ‘myset’ with answer ‘accept’
Imported x annotations for ‘myset’ with answer ‘reject’
Imported x annotations for ‘myset’ with answer ‘ignore’
Added <cli --answer, or as your documentation states, default is accept> to X annotations.

Again, thank you for clarification.

1 Like

Thanks for updating – and yes, that’s a good idea! Will add this to our list of todos for the next release :+1:

1 Like