Support model versions and worker configurations in CorpusWorkerVersion.objects.rebuild
Follow-up of #1509 (closed): CorpusWorkerVersionManager.rebuild
, aka CorpusWorkerVersion.objects.rebuild
, aka manage.py cache_worker_versions
, needs to support the new model version and worker configuration attributes.
Those can only be found from ML results via worker runs, but we still do need to have support for ML results that only have a worker_version_id
and no worker_run_id
, so the previous behavior should be kept for worker_run_id=None
. It should be possible to handle that in one query, with a Coalesce('worker_run__worker_version_id', 'worker_version_id')
to fallback on the older attribute.