mlcommons / medperf

An open benchmarking platform for medical artificial intelligence using Federated Evaluation.
https://www.medperf.org
Apache License 2.0
146 stars 32 forks source link

[BUG] Dataset generated UID uniquness contraint fail in PostgreSQL #622

Open hasan7n opened 1 month ago

hasan7n commented 1 month ago

Describe the bug The constraint that no two operational datasets should exist with the same generated uid, seems to work well in development tests but fails in production.

https://github.com/mlcommons/medperf/blob/09edc70bcf7f1615c532c8f8b15f10de9b406e33/server/dataset/models.py#L39-L47

To Reproduce Register two datasets in MedPerf with the same generated uid. Have one dataset in development and one dataset operational. Then, run medperf dataset set_operational on the development dataset. This returns 400 bad request when using the development version of medperf (as expected), but returns 500 internal server error using the production version of medperf.

Expected behavior It should also return 400 bad request in production.

Additional context This could be related to the fact that we use sqlite3 database in development, but we use postgresql in production.