AttributeError: Can't pickle local object 'get_dataloader.<locals>.train_trans'

Could you check how train_trans is defined as you might be running into a similar issue as described here.