Run fails for 5 CV folds

For a particular notebook/model, the submission run goes fine if I try it with a small number of CV folds (like 2), but raising this to 5 folds crashes the run after the first fold with a ‘TypeError: Object of type float32 is not JSON serializable’. The runs all go fine locally, so what causes the error during submission?

Python JSON support is pretty bad with data types that are from third-party libraries.

You may need to re-cast them to regular Python float before serialization or use another serialization library.
joblib is usually a good candidate as it allow for a 2-way perfect serialization.