Data Driven Resource Allocation for Distributed Learning