Skip to content

Support model versions in worker runs

Depends https://gitlab.com/arkindex/backend/-/issues/1018

Once we have the WorkerVersion.model_usage, the dataimport.WorkerRun model must support a nullable field model_version that is a FK towards training.ModelVersion.

This field must be manageable through the admin interface.

It must also be set when the flag WorkerVersion.model_usage is set to True on the associated worker_version.

A few changes are then required on these API endpoints:

  • StartProcess must fail (400) if any of its worker run has a worker version with model_usage = True and no model_version associated.
    • The error message must be explicit as it will be displayed to the end user in the frontend
  • UpdateWorkerRun must support an optional model_version_id UUID that will be allowed only when the associated worker version has model_usage = True.

CreateWorkerRun has no changes: it would be hard to implement in the frontend to select both a worker & model selection and THEN create the run. I think it's easier to keep the code as-is, display a warning, allow selecting a model.

The build_task_recipe is not extended yet (no changes on the process itself here).