IntegrityError when using non-objects as ModelVersion configurations
Sentry Issue: ARKINDEX-BACKEND-20T
CheckViolation: new row for relation "training_modelversion" violates check constraint "modelversion_configuration_objects"
DETAIL: Failing row contains (61df4bb6-30be-4687-8a4f-63313f3b6711, 2024-04-25 16:36:41.381009+00, 2024-05-28 11:27:46.364728+00, , yolov8x, available, f033f955f465e933711c25cdd437d760, 111468951, "ceci n'est pas une pipe", f6696314-4fee-4faa-9e67-297862fc117f, null, ba9f0cda61151754cb7ea26858b5dee1).
File "django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
IntegrityError: new row for relation "training_modelversion" violates check constraint "modelversion_configuration_objects"
DETAIL: Failing row contains (61df4bb6-30be-4687-8a4f-63313f3b6711, 2024-04-25 16:36:41.381009+00, 2024-05-28 11:27:46.364728+00, , yolov8x, available, f033f955f465e933711c25cdd437d760, 111468951, "ceci n'est pas une pipe", f6696314-4fee-4faa-9e67-297862fc117f, null, ba9f0cda61151754cb7ea26858b5dee1).
(22 additional frame(s) were not displayed)
...
File "django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 84, in _execute
with self.db.wrap_database_errors:
File "django/db/utils.py", line 91, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
The ModelVersion serializers use a JSONField, but the database only requires objects. We should be using a DictField instead, like for worker configurations.