Delete annotation from dataset/database

How can I delete an entry from a dataset once it is already saved in the database?

Thank you.

1 Like

If you want to modify an existing set, you can export the JSONL data, edit it however you like (remove entries, add entries) and then import the modified to a new dataset.

For example:

prodigy db-out old_dataset > dataset.jsonl
# modify dataset.jsonl
prodigy db-in new_dataset dataset.jsonl

In most cases, I’d recommend keeping the original dataset and adding a new one, so you don’t lose any state. Especially if you’ve already been running experiments, you don’t want to lose the ability to re-run them with the previous state and compare the results (or restore the old dataset if you’Ve made a mistake). If you do want to delete an existing dataset, you can use the prodigy drop command.

1 Like