multiprocess
optimus_dl.core.multiprocess
¶
finalize_process(timeout_seconds=5, max_retries=10)
¶
Finalizes the process by ensuring all child processes are terminated to prevent hanging. - First attempts a polite termination of child processes. - If any child processes are still alive after the timeout, it forcefully kills them. - Schedules a watchdog to force exit the process after a delay as a safety net.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout_seconds
|
int
|
Time to wait for child processes to terminate before force killing. |
5
|
max_retries
|
Maximum number of retries to check for alive child processes. |
10
|
Source code in optimus_dl/core/multiprocess.py
finish_mlflow()
¶
Ensures that all MLflow processes are terminated to prevent hanging.
Source code in optimus_dl/core/multiprocess.py
finish_wandb()
¶
Ensures that all WandB processes are terminated to prevent hanging.
Source code in optimus_dl/core/multiprocess.py
force_terminate_joblib()
¶
Forcefully terminates Joblib workers without allowing them to respawn.