You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
map_blocks can't detect block_id keyword in func(*args, block_id=None) #3081
changed the title [-]da.map_blocks does not pass block_id to func(*args, block_id=None)[/-][+]getargspec can't detect block_id keyword in func(*args, block_id=None)[/+]on Jan 19, 2018
changed the title [-]getargspec can't detect block_id keyword in func(*args, block_id=None)[/-][+]map_blocks can't detect block_id keyword in func(*args, block_id=None)[/+]on Jan 19, 2018
On Fri, Jan 19, 2018 at 9:46 AM, rzu512 ***@***.***> wrote:
Since map_blocks(...) gets the block_id from the key to the Dask graph,
finding the block_id doesn't take much time. In this case, is it a good
idea to make da.map_blocks(...) to pass block_id to func(*args, **kwargs)?
Of course, not every func(*args, **kwargs) needs block_id.
Alternatively can add a send_block_id keyword to map_blocks that
overrides the semi-automatic detection of block_id.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3081 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASszNJ3TkUybG1tZU8v9IZM37JD1IYEks5tMLjvgaJpZM4RklYz>
.
Activity
[-]da.map_blocks does not pass block_id to func(*args, block_id=None)[/-][+]getargspec can't detect block_id keyword in func(*args, block_id=None)[/+][-]getargspec can't detect block_id keyword in func(*args, block_id=None)[/-][+]map_blocks can't detect block_id keyword in func(*args, block_id=None)[/+]rzu512 commentedon Jan 19, 2018
Sorry... this seems to be a problem just in map_blocks.
Fix:
Result:
rzu512 commentedon Jan 19, 2018
Since
map_blocks(...)gets theblock_idfrom the key to the Dask graph, finding theblock_iddoesn't take much time.is it a good idea to make
da.map_blocks(...)to passblock_idtofunc(*args, **kwargs)?Alternatively can add a
send_block_idkeyword tomap_blocksthat overrides the semi-automatic detection ofblock_id.mrocklin commentedon Jan 19, 2018
rzu512 commentedon Jan 19, 2018
For python 2 / 3 compatibility, I usually write:
instead of
I learned that from the current implementation of
map_blocks(...).But in the first case,
block_idis not a keyword argument tofunc. I don't thinkinspect.getfullargspeccan detect my intention here.That makes me think about either adding a
send_block_idkeyword toda.map_blocks(...)or sendblock_idfor allfunc(..., **kwargs).Another alternative is to not use
*args.hmaarrfk commentedon Sep 17, 2018
This PR might be of help.
#3966