def load_train_log(directories, num_epochs, target_lr, **kwargs):
    parts = []
    for (d, ep, t_lr) in zip(directories, num_epochs, target_lr):
        files = ['{}/loss_ep{}.pkl'.format(d, i) for i in range(1, ep)]
        files = [f for f in files if os.path.exists(f)]
        part = pd.concat([pd.read_pickle(f) for f in files])
        part['lr'] = compute_lr(target_lr=t_lr, n_epochs=ep, **kwargs)[0:len(part)]
        parts.append(part)
    return pd.concat(parts).reset_index(drop=True)
def load_train_log(directories, num_epochs, target_lr, **kwargs):
    parts = []
    for (d, ep, t_lr) in zip(directories, num_epochs, target_lr):
        files = ['{}/loss_ep{}.pkl'.format(d, i) for i in range(1, ep)]
        files = [f for f in files if os.path.exists(f)]
        part = pd.concat([pd.read_pickle(f) for f in files])
        part['lr'] = compute_lr(target_lr=t_lr, n_epochs=ep, **kwargs)[0:len(part)]
        parts.append(part)
    return pd.concat(parts).reset_index(drop=True)