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

Disallow constructing frames from a ColumnAccessor #7298

Merged
merged 39 commits into from
Feb 5, 2021

Conversation

shwina
Copy link
Contributor

@shwina shwina commented Feb 3, 2021

Constructing a DataFrame from a ColumnAccessor previously had unintended side-effects:

In [1]: import cudf

In [2]: a = cudf.DataFrame({'a': [1, 2, 3]})

In [3]: a._data['a'].__cuda_array_interface__
Out[3]:
{'shape': (3,),
 'strides': (8,),
 'typestr': '<i8',
 'data': (140409137266688, False),
 'version': 1}

In [4]: a[['a']]
Out[4]:
   a
0  1
1  2
2  3

In [5]: a._data['a'].__cuda_array_interface__
Out[5]:
{'shape': (3,),
 'strides': (8,),
 'typestr': '<i8',
 'data': (140409137267200, False),
 'version': 1}

In a discussion with @galipremsagar - we decided that it's probably best not to handle ColumnAccessor in the frame constructors.

  • Remove special handling of ColumnAccessor in Frame constructors
  • Collapse Series.copy() and DataFrame.copy() into a single Frame.copy()

@shwina shwina added non-breaking Non-breaking change bug Something isn't working labels Feb 3, 2021
@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #7298 (02dcd24) into branch-0.18 (8860baf) will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.18    #7298      +/-   ##
===============================================
+ Coverage        82.09%   82.22%   +0.12%     
===============================================
  Files               97      100       +3     
  Lines            16474    16964     +490     
===============================================
+ Hits             13524    13948     +424     
- Misses            2950     3016      +66     
Impacted Files Coverage Δ
python/cudf/cudf/__init__.py 100.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/avro.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/csv.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/fuzzer.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/io.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/json.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/main.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/orc.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/parquet.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/utils.py 0.00% <ø> (ø)
... and 76 more

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 fb33b94...9df461a. Read the comment docs.

@shwina
Copy link
Contributor Author

shwina commented Feb 4, 2021

rerun tests

@shwina shwina marked this pull request as ready for review February 4, 2021 17:27
@shwina shwina requested a review from a team as a code owner February 4, 2021 17:27
Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

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

LGTM

@galipremsagar galipremsagar added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Feb 4, 2021
@galipremsagar
Copy link
Contributor

rerun tests

@kkraus14
Copy link
Collaborator

kkraus14 commented Feb 5, 2021

@gpucibot merge

1 similar comment
@kkraus14
Copy link
Collaborator

kkraus14 commented Feb 5, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 26b8c60 into rapidsai:branch-0.18 Feb 5, 2021
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 bug Something isn't working non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants