Hacking a multi tenancy Prodigy: problem with identical session IDs

Thanks for the report! This is an interesting constraint we hadn’t considered: When you start a new Prodigy annotation session, a semi-“unique” session ID is generated from the current timestamp. This allows the user and database to distinguish between individual sessions that add to the same dataset.

But it also means that if you start two sessions within the same second, the session IDs will be identical, which causes the error. In theory, this is desired behaviour – but we should probably consider adding an option to let the user plug in their own get_session_id() function or simply supply their own, custom session ID.

For now, the simplest workaround would probably be to make sure that you’re always waiting at least one second between starting sessions.

Btw, if you haven’t seen it already, check out this comment by Matt on strategies for managing multiple annotators with Prodigy.