Fixing pickle errors to allow for multiprocessing #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When training on multiple GPU's using ddp, there is an error with pickling escnn models. The solution was pointed out QUVA-Lab/e2cnn/pull/69 for the e2cnn library so I made similar modifications to escnn. This was discussed in issue #16.
I made a basic test file,
test_pickling.py
and I have fixed the problem for C(n) and D(n) on R2. I am happy to extend it to other groups if you want. The pickling error occurs because escnn uses local functions which cannot be pickled. The fix is to convert local functions to the__call__
methods of a class.