en compile_results linea 51 tienes el error al poner el 'val' del prefijo selection_metric = 'val '+ config['checkpoint_selection_metric'] eso no existe
best_round= int(np.argmax(history['metrics_distributed'][selection_metric])) y falla haz esto selection_metric = config['checkpoint_selection_metric'] sin 'val'