Troubles with features in .prepare()

I just have a torch dataloader and do multi gpu inference with accelerate. In loader I have a 3 fields: input_ids, attention_mask and user_ids, so, after get_inference_dataset this features still in loader, but after .prepare, I don’t have user_ids filed, only ids and mask.

inference_loader = get_inference_dataset(config, tokenizer)
print(next(iter(inference_loader))[“user_ids”])
inference_loader = accelerator.prepare_data_loader(inference_loader)
print(next(iter(inference_loader))[“user_ids”])

1 Like

This seems to happen because of drop_last=True. I don’t know if this is the case.