Calling #summary on a LightGBM model raises a comparison of Array with Array failed (ArgumentError) exception, which is coming from the #sort_by call in Eps::LightGBM#_summary. I don't know how to best add test coverage to expose the issue in the tests, but I can demonstrate it using data from LightGBMTest:
Converting all the keys to strings using #display_field before the call to #sort_by fixes the issue, so does flattening the temporary arrays inside the #sort_by block.
Calling #summary on a LightGBM model raises a
comparison of Array with Array failed (ArgumentError)
exception, which is coming from the #sort_by call in Eps::LightGBM#_summary. I don't know how to best add test coverage to expose the issue in the tests, but I can demonstrate it using data from LightGBMTest:ArgumentError will be raised if there are any string keys and array keys with the same value.
This is because strings can't be compared to arrays:
Converting all the keys to strings using #display_field before the call to #sort_by fixes the issue, so does flattening the temporary arrays inside the #sort_by block.