You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function set_sample_weight() in operator_utils.py is using inspect.getargspec(obj.fit) in line 112. This function seems to be deprecated in Python 3 and throws an error when trying to use the fit function fit(x, y, sample_weight=weights) with sample weights.
Pipelines that include for example XGBClassifier seem to be throwing a Value error, others do not throw an error.
A quick fix for this would be to replace line 112: if inspect.getargspec(obj.fit).args.count("sample_weight"):
with: if "sample_weight" in inspect.getfullargspec(obj.fit).args:
This seems to be working fine for me.
The text was updated successfully, but these errors were encountered:
The function
set_sample_weight()
inoperator_utils.py
is usinginspect.getargspec(obj.fit)
in line 112. This function seems to be deprecated in Python 3 and throws an error when trying to use the fit functionfit(x, y, sample_weight=weights)
with sample weights.Pipelines that include for example XGBClassifier seem to be throwing a Value error, others do not throw an error.
A quick fix for this would be to replace line 112:
if inspect.getargspec(obj.fit).args.count("sample_weight"):
with:
if "sample_weight" in inspect.getfullargspec(obj.fit).args:
This seems to be working fine for me.
The text was updated successfully, but these errors were encountered: