Add annotation start_timestamp to be stored in db

Hi Prodigy Team,

We want to analyze the users' speed when they do their annotation tasks. We need to track the start_timestamp when the task is presented on the interface so that the time taken can be calculated by start_timestamp - _timestamp. I wonder how we can have a custom field that we want to store to db.

Thank you for your support :slight_smile:

hi @ctoto93!

Have you seen @koaning's recent Prodigy short on using Prodigy's Update callback to keep track of annotator speed?

He also included the code too.

Somewhat related, have you see the Prodigy progress recipe? It does something similar.

$ python -m prodigy progress news_headlines_person,news_headlines_org

================================== Legend ==================================

New         New annotations collected in interval
Total       Total annotations collected
Unique      Unique examples (not counting multiple annotations of same example)
================================= Progress =================================

               New   Unique   Total   Unique
-----------   ----   ------   -----   ------
10 Jul 2021   1123      733    1123      733
12 Jul 2021    200      200    1323      933
13 Jul 2021    831      711    2154     1644
14 Jul 2021    157      150    2311     1790
15 Jul 2021   1464     1401    3775     3191

If you're interested in seeing that code, you can view the underlying script by finding the location of your Prodigy install (python -m prodigy stats and find Location: path), then looking in that folder for the recipes/ file.

Related, it's important to know that when you start a new Prodigy session without a specified session name, Prodigy creates separate session datasets for each annotation session, using the timestamp of when the session was started. You can see an overview of all timestamped sessions by running prodigy stats -ls and the timestamp name of the session dataset is also printed when you exit the server.

Hope this helps! Let us know if you have further questions.

Hi @ryanwesslen,
Thank you for your prompt response. That's definitely what we are looking for. I will let you know if I have further questions :slight_smile: