Project-MONAI / Project-MONAI/MONAI
Make Monai (Random) Transforms work in a multi-threaded environment
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
With PEP 703 being accepted and implementation of it underway https://github.com/python/cpython/issues/108219 I think it would be great to prepare the Monai transforms early for execution on multiple threads. Especially with the large tensor sizes and the advantages of running transforms on GPU, I'm hoping for free-threading to have a big benefit in (3D) medical imaging AI.
I think the biggest issue here would be the Randomizable transforms, which currently can't be executed inside a threaded environment.
AFAIK, the free-threading is pushed by Meta, and I'm therefore expecting pytorch to be compatible with it relatively early, since one of the talks on no-gil python talked about testing it with a pytorch DL project internally at Meta.
This might be a great opportunity to work on https://github.com/Project-MONAI/MONAI/issues/6854 as well, which might eventually require breaking changes in the Randomizable API as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading MONAI's Randomizable transforms and the related issue #6854, then review the PEP 703 free-threading context linked here. The issue names no files or tests, so first establish the required thread-safety changes and whether the Randomizable API needs breaking changes. Done requires an agreed implementation that supports Randomizable transforms in a multi-threaded environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100