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

Removing remaining include of raft/distance/distance_type.hpp #5264

Merged
merged 6 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cpp/bench/sg/kmeans.cu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <cuml/cluster/kmeans.hpp>
#include <cuml/common/logger.hpp>
#include <raft/cluster/specializations.cuh>
#include <raft/distance/distance_type.hpp>
#include <raft/distance/distance_types.hpp>
#include <raft/random/rng_state.hpp>
#include <utility>

Expand Down
3 changes: 3 additions & 0 deletions python/cuml/feature_extraction/_vectorizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def get_ngrams(self, str_series, ngram_size, doc_id_sr):
doc_id_sr : cudf.Series
Int series containing documents ids
"""

if self.analyzer == "word":
token_count_sr = str_series.str.token_count(self.delimiter)
ngram_sr = str_series.str.ngrams_tokenize(
Expand All @@ -225,6 +226,8 @@ def get_ngrams(self, str_series, ngram_size, doc_id_sr):
doc_id_sr = doc_id_sr.repeat(ngram_count).reset_index(drop=True)
tokenized_df = cudf.DataFrame()
tokenized_df["doc_id"] = doc_id_sr

ngram_sr = ngram_sr.reset_index(drop=True)
tokenized_df["token"] = ngram_sr
return tokenized_df

Expand Down
2 changes: 1 addition & 1 deletion python/cuml/metrics/distance_type.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

cdef extern from "raft/distance/distance_type.hpp" namespace "raft::distance":
cdef extern from "raft/distance/distance_types.hpp" namespace "raft::distance":

ctypedef enum DistanceType:
L2Expanded "raft::distance::DistanceType::L2Expanded"
Expand Down
2 changes: 1 addition & 1 deletion python/cuml/metrics/trustworthiness.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ from cuml.internals.input_utils import input_to_cuml_array
from pylibraft.common.handle import Handle
from pylibraft.common.handle cimport handle_t

cdef extern from "raft/distance/distance_type.hpp" namespace "raft::distance":
cdef extern from "raft/distance/distance_types.hpp" namespace "raft::distance":

ctypedef int DistanceType
ctypedef DistanceType euclidean "(raft::distance::DistanceType)5"
Expand Down