From a quick glance, I can’t see anything unusual. What is the type of y_train?
Can you simplify the example? Strip out all the unneeded parts so that the error still occurs. For example, you could use random data for X_train etc to remove the dependence on ScikitLearn.