Spaces:
Paused
Paused
Harald Deutschmann commited on
Commit ·
b822be2
1
Parent(s): 201b1c5
spawn start method
Browse files- train/router.py +1 -0
train/router.py
CHANGED
|
@@ -55,6 +55,7 @@ async def train_model(file: UploadFile | None = None, eval_steps: Annotated[int,
|
|
| 55 |
return {"message": "No file sent"}
|
| 56 |
else:
|
| 57 |
file_content = await file.read()
|
|
|
|
| 58 |
running_process = mp.Process(target=train, args=(file_content, eval_steps))
|
| 59 |
running_process.start()
|
| 60 |
return {"message": "Training started"}
|
|
|
|
| 55 |
return {"message": "No file sent"}
|
| 56 |
else:
|
| 57 |
file_content = await file.read()
|
| 58 |
+
mp.set_start_method("spawn")
|
| 59 |
running_process = mp.Process(target=train, args=(file_content, eval_steps))
|
| 60 |
running_process.start()
|
| 61 |
return {"message": "Training started"}
|