As the doc said, in ranking jobs, the sample_weight is assigned to each group but each data point, so I think the shape of sample_weight should be the same with group. But this make python iterpreter ...