Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use elif in Dask deserialize check #4537

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

jakirkham
Copy link
Member

Slight tweak to the checks added in PR ( #4423 ).

@jakirkham jakirkham requested a review from a team as a code owner March 17, 2020 03:39
@jakirkham jakirkham added 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. dask Dask issue dask-cudf labels Mar 17, 2020
@@ -44,7 +44,7 @@ def deserialize_cudf_object(header, frames):
# some frames are empty -- meta/empty partitions/etc
if len(f) > 0:
assert hasattr(f, "__cuda_array_interface__")
if header["serializer"] == "dask":
elif header["serializer"] == "dask":
Copy link
Collaborator

@kkraus14 kkraus14 Mar 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving discussion to here. I understand that this should be elif, but how could both conditions evaluate to True here regardless?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wouldn't be possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkraus14 are you suggesting this should be else and not elif ?

Copy link
Collaborator

@kkraus14 kkraus14 Mar 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I wasn't aware that header['serializer'] could be a list of elements, but I'm still not clear on how both conditions could trigger here because it's ==.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is incorrect. header["serializer"] should only be a single str with a serializer named.

Ben was mentioning that multiple serializers could be used to transform the data (and its various components), which is different from the value seen here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakirkham So then is this a fix for something or just preventing an additional conditional check?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just preventing an additional check. Something I stumbled across recently when looking at the serialization code.

@kkraus14
Copy link
Collaborator

rerun tests

@kkraus14 kkraus14 added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Mar 17, 2020
@codecov
Copy link

codecov bot commented Mar 17, 2020

Codecov Report

Merging #4537 into branch-0.13 will increase coverage by 0.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.13    #4537      +/-   ##
===============================================
+ Coverage        88.68%   88.70%   +0.01%     
===============================================
  Files               50       50              
  Lines             9800     9850      +50     
===============================================
+ Hits              8691     8737      +46     
- Misses            1109     1113       +4     
Impacted Files Coverage Δ
python/cudf/cudf/comm/serialize.py 0.00% <0.00%> (ø)
python/dask_cudf/dask_cudf/accessor.py 78.12% <100.00%> (ø)
python/dask_cudf/dask_cudf/core.py 72.42% <100.00%> (-2.58%) ⬇️
python/cudf/cudf/core/column/datetime.py 87.50% <0.00%> (-0.10%) ⬇️
python/cudf/cudf/core/index.py 89.11% <0.00%> (ø)
python/dask_cudf/dask_cudf/batcher_sortnet.py
python/dask_cudf/dask_cudf/sorting.py 93.40% <0.00%> (ø)
python/cudf/cudf/core/column/column.py 88.11% <0.00%> (+0.25%) ⬆️
python/cudf/cudf/utils/utils.py 84.97% <0.00%> (+0.48%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5be12d1...b062095. Read the comment docs.

@jakirkham jakirkham merged commit 1410b60 into rapidsai:branch-0.13 Mar 17, 2020
@jakirkham jakirkham deleted the use_elif_deserialize branch March 24, 2020 01:47
@vyasr vyasr removed the dask-cudf label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge dask Dask issue Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants