BUG: distribute_jobs no longer works on Win/MacOS#585
Merged
carterbox merged 1 commit intotomopy:masterfrom Jun 16, 2022
Merged
BUG: distribute_jobs no longer works on Win/MacOS#585carterbox merged 1 commit intotomopy:masterfrom
carterbox merged 1 commit intotomopy:masterfrom
Conversation
Member
Author
|
A recent patch to the numpy library (1.22.4), changed the behavior of np.from_buffer(), but only on non-linux platforms? On these platforms, the "base" attribute of a shared array is now memory view instead of the same as thee array before from_buffer is applied. The affected code is here: tomopy/source/tomopy/util/dtype.py Lines 149 to 153 in 51b58c8 where shared_arr.base is now a memoryview instead of a mp.RawArray. |
Member
Author
|
@michael-sutherland, do you have any opinions about whether we should refactor the TomoPy implementation of distribute_jobs or pursue the patch in NumPy? I don't really understand the reasons/motivations behind either case. |
carterbox
added a commit
to carterbox/tomopy
that referenced
this pull request
May 31, 2022
Also removes openblas varirant pinning. Closes tomopy#585
Member
Author
|
The API change which causes this issue was patched upstream. |
ca55f87 to
f0dd852
Compare
A change in numpy=1.22.4 caused the following error:
def dump(obj, file, protocol=None):
'''Replacement for pickle.dump() using ForkingPickler.'''
> ForkingPickler(file, protocol).dump(obj)
E TypeError: cannot pickle 'memoryview' object
f0dd852 to
1b65456
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This error is occuring on the conda-forge feedstock OSX builds. Research tells me that it is caused by trying to pass memory views instead of numpy arrays to the multiprocessing distrbute_jobs function.