It seems compute_accuracy_and_loss_f1score_metrics returns some metrics with the F1 score, which is assigned to f1, while you are appending valid_f1 in:
valid_f1_lst.append(valid_f1)

Could you check, where valid_f1 is coming from?