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

[DOC] Improved deprecation warnings. #9347

Merged
merged 3 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions python/cudf/cudf/core/column/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -4595,7 +4595,7 @@ def subword_tokenize(
This function requires about 21x the number of character bytes
in the input strings column as working memory.

``ser.str.subword_tokenize`` will be depreciated in future versions.
``Series.str.subword_tokenize`` will be deprecated in future versions.
Use ``cudf.core.subword_tokenizer.SubwordTokenizer`` instead.

Parameters
Expand Down Expand Up @@ -4669,14 +4669,13 @@ def subword_tokenize(
array([[0, 0, 2],
[1, 0, 1]], dtype=uint32)
"""
warning_message = (
"`ser.str.subword_tokenize` API will be depreciated"
" in future versions of cudf.\n"
"Use `cudf.core.subword_tokenizer.SubwordTokenizer` "
"instead"
warnings.warn(
"`Series.str.subword_tokenize` will be deprecated "
"in future versions of cudf.\n"
"Use `cudf.core.subword_tokenizer.SubwordTokenizer` instead.",
FutureWarning,
vyasr marked this conversation as resolved.
Show resolved Hide resolved
)

warnings.warn(warning_message, FutureWarning)
tokens, masks, metadata = libstrings.subword_tokenize_vocab_file(
self._column,
hash_file,
Expand Down
6 changes: 3 additions & 3 deletions python/dask_cudf/dask_cudf/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ def var(
return _parallel_var(self, meta, skipna, split_every, out)

def repartition(self, *args, **kwargs):
""" Wraps dask.dataframe DataFrame.repartition method.
"""Wraps dask.dataframe DataFrame.repartition method.
Uses DataFrame.shuffle if `columns=` is specified.
"""
# TODO: Remove this function in future(0.17 release)
columns = kwargs.pop("columns", None)
if columns:
warnings.warn(
"The column argument will be removed from repartition in "
" future versions of dask_cudf. Use DataFrame.shuffle().",
"The columns argument will be removed from repartition in "
"future versions of dask_cudf. Use DataFrame.shuffle().",
DeprecationWarning,
)
warnings.warn(
Expand Down
3 changes: 2 additions & 1 deletion python/dask_cudf/dask_cudf/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ def read_parquet(
if row_groups_per_part:
warnings.warn(
"row_groups_per_part is deprecated. "
"Pass an integer value to split_row_groups instead."
"Pass an integer value to split_row_groups instead.",
DeprecationWarning,
)
if split_row_groups is None:
split_row_groups = row_groups_per_part
Expand Down