[Data] Fix write_results type - #33936
Conversation
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
|
I think we need to fix https://github.com/ray-project/ray/blob/master/python/ray/data/_internal/planner/write.py#L16: from: return [[datasource.write(blocks, ctx, **write_args)]]to: return [datasource.write(blocks, ctx, **write_args)]@jianoaix - the above double |
I think it's correct as is. Without the double brackets, we return an |
|
@bveeramani - ah sorry you are right. A Python list is a valid |
Yep, the output of write op is a list of blocks with block type being a List. |
|
@bveeramani - can you also add a comment in https://github.com/ray-project/ray/blob/master/python/ray/data/_internal/planner/write.py ? Something like |
Signed-off-by: Balaji Veeramani <balaji@anyscale.com>
|
cc @zhe-thoughts to approve, this is to fix a bug in |
zhe-thoughts
left a comment
There was a problem hiding this comment.
Approved for merging into master
`Dataset.write_datasource` passes a `list[list[WriteResult]]` to `Datasource.on_write_complete` instead of a `list[WriteResult]`. This PR fixes the bug. Signed-off-by: elliottower <elliot@elliottower.com>
`Dataset.write_datasource` passes a `list[list[WriteResult]]` to `Datasource.on_write_complete` instead of a `list[WriteResult]`. This PR fixes the bug. Signed-off-by: Jack He <jackhe2345@gmail.com>
Why are these changes needed?
Dataset.write_datasourcepasses alist[list[WriteResult]]toDatasource.on_write_completeinstead of alist[WriteResult]. This PR fixes the bug.Related issue number
Fixes #33935
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.