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

[python] Migrate to f-strings in python-package/lightgbm/sklearn.py #4188

Merged
merged 9 commits into from
Apr 19, 2021
Prev Previous commit
Next Next commit
resolve conflicts
akshitadixit committed Apr 18, 2021
commit 7c5836ca9715d3b98fb05ef9b45429dfc9660ea6
6 changes: 0 additions & 6 deletions python-package/lightgbm/sklearn.py
Original file line number Diff line number Diff line change
@@ -919,16 +919,10 @@ def predict_proba(self, X, raw_score=False, start_iteration=0, num_iteration=Non
"""Docstring is set after definition, using a template."""
result = super().predict(X, raw_score, start_iteration, num_iteration, pred_leaf, pred_contrib, **kwargs)
if callable(self._objective) and not (raw_score or pred_leaf or pred_contrib):
<<<<<<< HEAD
new_line = "\n"
_log_warning(f"Cannot compute class probabilities or labels "
f"due to the usage of customized objective function.{new_line}"
f"Returning raw scores instead.")
=======
_log_warning("Cannot compute class probabilities or labels "
"due to the usage of customized objective function.\n"
"Returning raw scores instead.")
>>>>>>> 66ea376c13d018ef5eacb9d38e5863491b8cd109
return result
elif self._n_classes > 2 or raw_score or pred_leaf or pred_contrib:
return result