Change nvtext::load_vocabulary_file to return a unique ptr - #7424
Conversation
jrhemstad
left a comment
There was a problem hiding this comment.
This is a code smell. There is rarely a reason to return a shared_ptr from a function. It should likely return a unique_ptr and if someone desires a shared_ptr they can trivially make it into one.
Just commenting that from the Python side we can handle a |
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #7424 +/- ##
==============================================
Coverage ? 82.21%
==============================================
Files ? 101
Lines ? 17057
Branches ? 0
==============================================
Hits ? 14023
Misses ? 3034
Partials ? 0 Continue to review full report at Codecov.
|
|
@gpucibot merge |
Reference #5868
This PR changes the
nvtext::load_vocabulary_fileto return a unique-pointer to make it easier to manage in Python/Cython class object. The original signature returned a flat structure that contained unique-pointers which would make it difficult to copy and manage.The corresponding gtests and gbenchmarks were updated for this API change.