Skip to content

Commit 2db631e

Browse files
committed
Undeprecated byte-pair-encoding APIs
1 parent 66794d6 commit 2db631e

3 files changed

Lines changed: 2 additions & 21 deletions

File tree

cpp/include/nvtext/byte_pair_encoding.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ struct bpe_merge_pairs {
6363
/**
6464
* @brief Create a nvtext::bpe_merge_pairs from a strings column
6565
*
66-
* @deprecated Since 26.04
67-
*
6866
* The input column should contain a unique pair of strings per line separated by
6967
* a single space. An incorrect format or non-unique entries will result in
7068
* undefined behavior.
@@ -87,16 +85,14 @@ struct bpe_merge_pairs {
8785
* @param mr Memory resource to allocate any returned objects
8886
* @return A nvtext::bpe_merge_pairs object
8987
*/
90-
[[deprecated]] std::unique_ptr<bpe_merge_pairs> load_merge_pairs(
88+
std::unique_ptr<bpe_merge_pairs> load_merge_pairs(
9189
cudf::strings_column_view const& merge_pairs,
9290
rmm::cuda_stream_view stream = cudf::get_default_stream(),
9391
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());
9492

9593
/**
9694
* @brief Byte pair encode the input strings.
9795
*
98-
* @deprecated Since 26.04
99-
*
10096
* The encoding algorithm rebuilds each string by matching substrings
10197
* in the `merge_pairs` table and iteratively removing the minimum ranked pair
10298
* until no pairs are left. Then, the separator is inserted between the remaining
@@ -121,7 +117,7 @@ struct bpe_merge_pairs {
121117
* @param mr Memory resource to allocate any returned objects.
122118
* @return An encoded column of strings.
123119
*/
124-
[[deprecated]] std::unique_ptr<cudf::column> byte_pair_encoding(
120+
std::unique_ptr<cudf::column> byte_pair_encoding(
125121
cudf::strings_column_view const& input,
126122
bpe_merge_pairs const& merges_pairs,
127123
cudf::string_scalar const& separator = cudf::string_scalar(" "),

python/cudf/cudf/core/byte_pair_encoding.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
from __future__ import annotations
55

6-
import warnings
7-
86
import pylibcudf as plc
97

108
from cudf.core.series import Series
@@ -15,9 +13,6 @@ class BytePairEncoder:
1513
Given a merge pairs strings series, performs byte pair encoding on
1614
a strings series using the provided separator.
1715
18-
.. deprecated:: 26.04
19-
BytePairEncoder is deprecated and will be removed in a future version.
20-
2116
Parameters
2217
----------
2318
merges_pairs : str
@@ -29,11 +24,6 @@ class BytePairEncoder:
2924
"""
3025

3126
def __init__(self, merges_pair: Series) -> None:
32-
warnings.warn(
33-
"BytePairEncoder is deprecated and will be removed in a future version.",
34-
FutureWarning,
35-
stacklevel=2,
36-
)
3727
self.merge_pairs = plc.nvtext.byte_pair_encode.BPEMergePairs(
3828
merges_pair._column.plc_column
3929
)

python/cudf/cudf/core/column/string.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,6 @@ def byte_pair_encoding(
700700
merge_pairs: plc.nvtext.byte_pair_encode.BPEMergePairs,
701701
separator: str,
702702
) -> Self:
703-
warnings.warn(
704-
"byte_pair_encoding is deprecated and will be removed in a future version.",
705-
FutureWarning,
706-
stacklevel=2,
707-
)
708703
with self.access(mode="read", scope="internal"):
709704
plc_column = plc.nvtext.byte_pair_encode.byte_pair_encoding(
710705
self.plc_column,

0 commit comments

Comments
 (0)