add training function properties: check rank, print progress