That’s exactly what I mean! It’s very helpful, thank you!
Right now I realize that the 3rd one is the key problem I met.
The real dataset usually has irregular line numbers such as 361234 which cannot be divisible without a remainder by chunk size. So the chunk size matters rather than batch size, and the lazy way to handle this runtime error is to make #lines be divisible by chunk size, right?