Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add warning in a multiprocessing special case (#6830)
Related to discussion #6657 This code at least adds a warning if `set_track_meta(False)` and `multiprocessing_context='spawn'` are used in the same code. However this warning only triggers if `set_track_meta(False)` has been called before the DataLoader has been initialized. I will append some example code where this is not True, still the bug is triggered. Imo this is still a MONAI bug even though in the discussion it was claimed otherwise. The multiprocessing_context='spawn' has unintended consequences and this is only true for MONAI and not for torch. (I believe the problem is that with 'spawn' Python and all the libs get reinitialized and thus _TRACK_META is reset to being True). ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Matthias Hadlich <matthiashadlich@posteo.de>
- Loading branch information