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

Rework nvtext::detokenize to use indexalator for row indices #12267

Merged

Conversation

davidwendt
Copy link
Contributor

Description

Rework nvtext::detokenize to use the cudf::detail::make_strings_children and the cudf::detail::indexalator.
This allows the operation to throw an error if it the output would exceed the size limit of a column.
The indexalator usage removes the need for a type-dispatcher call for the row-indices.
No function has been added, removed, or changed.

Reference #12167

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 30, 2022
@davidwendt davidwendt self-assigned this Nov 30, 2022
@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Base: 88.37% // Head: 88.16% // Decreases project coverage by -0.20% ⚠️

Coverage data is based on head (df5b2cd) compared to base (a9f9958).
Patch coverage: 87.50% of modified lines in pull request are covered.

❗ Current head df5b2cd differs from pull request most recent head 64deeb1. Consider uploading reports for the commit 64deeb1 to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-23.02   #12267      +/-   ##
================================================
- Coverage         88.37%   88.16%   -0.21%     
================================================
  Files               137      137              
  Lines             22657    22665       +8     
================================================
- Hits              20022    19982      -40     
- Misses             2635     2683      +48     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/column.py 87.95% <ø> (-0.03%) ⬇️
python/cudf/cudf/core/series.py 95.83% <ø> (ø)
python/cudf/cudf/core/dataframe.py 93.44% <66.66%> (-0.22%) ⬇️
python/cudf/cudf/core/_base_index.py 81.15% <100.00%> (ø)
python/cudf/cudf/core/index.py 92.92% <100.00%> (ø)
python/cudf/cudf/core/reshape.py 83.40% <100.00%> (+0.03%) ⬆️
python/cudf/cudf/testing/_utils.py 94.30% <100.00%> (+0.18%) ⬆️
...thon/dask_cudf/dask_cudf/tests/test_distributed.py 18.86% <0.00%> (-67.93%) ⬇️
python/cudf/cudf/core/column/lists.py 92.78% <0.00%> (-0.97%) ⬇️
python/cudf/cudf/core/column/decimal.py 91.35% <0.00%> (-0.55%) ⬇️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Dec 1, 2022
@davidwendt davidwendt marked this pull request as ready for review December 1, 2022 22:14
@davidwendt davidwendt requested a review from a team as a code owner December 1, 2022 22:14
cpp/src/text/detokenize.cu Outdated Show resolved Hide resolved
cpp/src/text/detokenize.cu Outdated Show resolved Hide resolved
cpp/src/text/detokenize.cu Outdated Show resolved Hide resolved
cpp/src/text/detokenize.cu Outdated Show resolved Hide resolved
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Only one comment on naming. Otherwise LGTM!

cudf::size_type tokens_counts,
rmm::cuda_stream_view stream)
{
index_changed_fn pfn{cudf::detail::indexalator_factory::make_input_iterator(row_indices),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what pfn means. "P..." function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The 'p' is silent.

Copy link
Contributor

@karthikeyann karthikeyann left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@davidwendt
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit edfe470 into rapidsai:branch-23.02 Dec 7, 2022
@davidwendt davidwendt deleted the nvtext-make-strings-children branch December 7, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants