In the evaluate_model_CV method of the generic_task.py module, the StratifiedKFold.split() method was missing a required positional argument 'y'. This caused a TypeError when attempting to split the dataset for cross-validation.
To address this issue #1303, I added the missing 'y' argument to the StratifiedKFold.split() method call. The corrected line of code now reads:
kf = kf.split(X_train_split, y_train_split)
This modification ensures that the StratifiedKFold cross-validation splits the dataset correctly, allowing the AutoML fit method to run without encountering errors.
This fix resolves the issue reported in the FLAML library when using custom StratifiedKFold cross-validation.
In the
evaluate_model_CV
method of thegeneric_task.py
module, theStratifiedKFold.split()
method was missing a required positional argument 'y'. This caused a TypeError when attempting to split the dataset for cross-validation.To address this issue #1303, I added the missing 'y' argument to the
StratifiedKFold.split()
method call. The corrected line of code now reads:This modification ensures that the StratifiedKFold cross-validation splits the dataset correctly, allowing the AutoML fit method to run without encountering errors.
This fix resolves the issue reported in the FLAML library when using custom StratifiedKFold cross-validation.
Why are these changes needed?
Related issue number
Checks