t = ta.Scan(...) best_idx = t.best_model(metric='loss', asc=True) # Change the configurations accordingly to your case