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

Return Python string from dump_as_json() of RF #3130

Merged
merged 2 commits into from
Nov 11, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
- PR #3086: Reverting FIL Notebook Testing
- PR #3114: Fixed a typo in SVC's predict_proba AttributeError
- PR #3119: Fix memset args for benchmark
- PR #3130: Return Python string from `dump_as_json()` of RF

# cuML 0.16.0 (Date TBD)

Expand Down
4 changes: 2 additions & 2 deletions python/cuml/ensemble/randomforestclassifier.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -933,5 +933,5 @@ class RandomForestClassifier(BaseRandomForestModel, ClassifierMixin):
<RandomForestMetaData[double, int]*><uintptr_t> self.rf_forest64

if self.dtype == np.float64:
return dump_rf_as_json(rf_forest64)
return dump_rf_as_json(rf_forest)
return dump_rf_as_json(rf_forest64).decode('utf-8')
return dump_rf_as_json(rf_forest).decode('utf-8')
4 changes: 2 additions & 2 deletions python/cuml/ensemble/randomforestregressor.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -739,5 +739,5 @@ class RandomForestRegressor(BaseRandomForestModel, RegressorMixin):
<RandomForestMetaData[double, double]*><uintptr_t> self.rf_forest64

if self.dtype == np.float64:
return dump_rf_as_json(rf_forest64)
return dump_rf_as_json(rf_forest)
return dump_rf_as_json(rf_forest64).decode('utf-8')
return dump_rf_as_json(rf_forest).decode('utf-8')