Closed leiyue closed 1 year ago
get_best_dls_params function still prints output when the verbose parameter is set to false. I made a little tweak, hope that helps.
get_best_dls_params
def get_best_dls_params(dls, n_iters=10, num_workers=[0, 1, 2, 4, 8], pin_memory=[True, False], prefetch_factor=[2, 4, 8], return_best=True, verbose=True): for i in range(len(dls.loaders)): try: if verbose: print(f'\nDataloader {i}\n') dls.loaders[i] = get_best_dl_params(dls.loaders[i], n_iters=n_iters, num_workers=num_workers, pin_memory=pin_memory, prefetch_factor=prefetch_factor, return_best=return_best, verbose=verbose) except KeyboardInterrupt: pass return dls
Hi @leiyue, You are right. I verbose is set to False, nothing should be printed. That was a miss. Would you like to create a PR to fix this issue?
This issue is fixed now.
get_best_dls_params
function still prints output when the verbose parameter is set to false. I made a little tweak, hope that helps.