Skip to content

Commit

Permalink
fux
Browse files Browse the repository at this point in the history
  • Loading branch information
hzy46 committed Nov 3, 2021
1 parent 0854f67 commit 93c2e72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion python-package/lightgbm/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,8 @@ def __init_from_csc(self, csc, params_str, ref_dataset):

@staticmethod
def _compare_params_for_warning(params, other_params):
""" Compare params.
"""Compare params.
It is only for the warning purpose. Thus some keys are ignored.
Returns
Expand All @@ -1778,6 +1779,10 @@ def _compare_params_for_warning(params, other_params):
If they are equal, return True; Otherwise, return False.
"""
ignore_keys = _ConfigAliases.get("categorical_feature")
if params is None:
params = {}
if other_params is None:
other_params = {}
for k in other_params:
if k not in ignore_keys:
if k not in params or params[k] != other_params[k]:
Expand Down

0 comments on commit 93c2e72

Please sign in to comment.