It's mistake to filter polars.Dataframe and convert result to torch.Tensor in __get_item__ of torch.Dataset. Convert the whole dataframe to tensor solved the problem.
polars.Dataframe
torch.Tensor
__get_item__
torch.Dataset