HumanSignal / HumanSignal/label-studio-ml-backend
CUDA with multiprocessing
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 490
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
Greetings,
I'm getting this error when use ml backend with PyTorch.
`RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method`
I see [there](https://stackoverflow.com/questions/48822463/how-to-use-pytorch-multiprocessing) is a solution.
I try to fix it [here](https://github.com/Fireblossom/label-studio-ml-backend/commit/ab6eda363c28bb5d2b237b2d47c8f5d5be3e0e63#diff-32ea3090e98a3229619bf0947ca5f38c97b052b597636e32de195038a9547460) and it works fine on my machine.
Do you think my solution is feasible?
If so, I can make a PR ;-)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.