diff --git a/python/cudf/cudf/core/column/string.py b/python/cudf/cudf/core/column/string.py index c59081e4b59..81a4b50f00f 100644 --- a/python/cudf/cudf/core/column/string.py +++ b/python/cudf/cudf/core/column/string.py @@ -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`` is deprecated and will be removed. Use ``cudf.core.subword_tokenizer.SubwordTokenizer`` instead. Parameters @@ -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` is deprecated and will be removed " + "in future versions of cudf. Use " + "`cudf.core.subword_tokenizer.SubwordTokenizer` instead.", + FutureWarning, ) - warnings.warn(warning_message, FutureWarning) tokens, masks, metadata = libstrings.subword_tokenize_vocab_file( self._column, hash_file, diff --git a/python/cudf/cudf/core/index.py b/python/cudf/cudf/core/index.py index 574da689e79..3d2cd810417 100644 --- a/python/cudf/cudf/core/index.py +++ b/python/cudf/cudf/core/index.py @@ -610,7 +610,7 @@ def deserialize(cls, header, frames): "21.10 or older will no longer be deserializable " "after version 21.12. Please load and resave any " "pickles before upgrading to version 22.02.", - DeprecationWarning, + FutureWarning, ) header["columns"] = [header.pop("index_column")] header["column_names"] = pickle.dumps( diff --git a/python/cudf/cudf/core/multiindex.py b/python/cudf/cudf/core/multiindex.py index 744c5cdc25d..9f999462044 100644 --- a/python/cudf/cudf/core/multiindex.py +++ b/python/cudf/cudf/core/multiindex.py @@ -867,7 +867,7 @@ def deserialize(cls, header, frames): "21.10 or older will no longer be deserializable " "after version 21.12. Please load and resave any " "pickles before upgrading to version 22.02.", - DeprecationWarning, + FutureWarning, ) header["column_names"] = header["names"] column_names = pickle.loads(header["column_names"]) @@ -877,7 +877,7 @@ def deserialize(cls, header, frames): "21.08 or older will no longer be deserializable " "after version 21.10. Please load and resave any " "pickles before upgrading to version 21.12.", - DeprecationWarning, + FutureWarning, ) df = cudf.DataFrame.deserialize(header["source_data"], frames) return cls.from_frame(df)._set_names(column_names) diff --git a/python/cudf/cudf/core/series.py b/python/cudf/cudf/core/series.py index 9439de5b23b..156ae4636b6 100644 --- a/python/cudf/cudf/core/series.py +++ b/python/cudf/cudf/core/series.py @@ -378,7 +378,7 @@ def deserialize(cls, header, frames): "21.10 or older will no longer be deserializable " "after version 21.12. Please load and resave any " "pickles before upgrading to version 22.02.", - DeprecationWarning, + FutureWarning, ) header["columns"] = [header.pop("column")] header["column_names"] = pickle.dumps( @@ -838,7 +838,7 @@ def set_mask(self, mask, null_count=None): """ warnings.warn( "Series.set_mask is deprecated and will be removed in the future.", - DeprecationWarning, + FutureWarning, ) return self._from_data( {self.name: self._column.set_mask(mask)}, self._index @@ -3249,7 +3249,7 @@ def update(self, other): def reverse(self): warnings.warn( "Series.reverse is deprecated and will be removed in the future.", - DeprecationWarning, + FutureWarning, ) rinds = column.arange((self._column.size - 1), -1, -1, dtype=np.int32) return self._from_data( @@ -3373,9 +3373,9 @@ def label_encoding(self, cats, dtype=None, na_sentinel=-1): """ warnings.warn( - "Series.label_encoding is deprecated and will be removed in the future.\ - Consider using cuML's LabelEncoder instead", - DeprecationWarning, + "Series.label_encoding is deprecated and will be removed in the " + "future. Consider using cuML's LabelEncoder instead.", + FutureWarning, ) def _return_sentinel_series(): diff --git a/python/dask_cudf/dask_cudf/core.py b/python/dask_cudf/dask_cudf/core.py index e604e5511da..328a26ff81c 100644 --- a/python/dask_cudf/dask_cudf/core.py +++ b/python/dask_cudf/dask_cudf/core.py @@ -298,16 +298,16 @@ 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().", - DeprecationWarning, + "The columns argument will be removed from repartition in " + "future versions of dask_cudf. Use DataFrame.shuffle().", + FutureWarning, ) warnings.warn( "Rearranging data by column hash. Divisions will lost. " diff --git a/python/dask_cudf/dask_cudf/io/parquet.py b/python/dask_cudf/dask_cudf/io/parquet.py index 850cc0843cc..cb9268c41f9 100644 --- a/python/dask_cudf/dask_cudf/io/parquet.py +++ b/python/dask_cudf/dask_cudf/io/parquet.py @@ -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.", + FutureWarning, ) if split_row_groups is None: split_row_groups = row_groups_per_part