/src/data/data.cc:487: Check failed: valid: Label contains NaN, infinity or a value too large

I am getting this error but it’s unclear to me what is causing it:
‘/src/data/data.cc:487: Check failed: valid: Label contains NaN, infinity or a value too large.’

It looks similar to the errors Input contains NaN, infinity or a value too large for dtype() but this is something different.

Do the label names have to be only a certain length? Any help understanding what this check does would be appreciated.

I’m stupid, my “y” input to the XGBoost model had NaN values in it.