Currently, ml models are trained using background_tasks in fastapi. This allows for scalablity and also takes the load from the ml-microservice.