How To Apply Early Stopping in The Case of Person Reid

Im training on Reid Dataset and i want to perform early stopping the problem is i have 3 sets
train with id on each sample , gallery the set of available ids , query the set of sample that i need to match on gallery the scores is calculated are mAP , cmc form rank 1 , 5 , 20 …

when i split the train and val i dont have gallry and query on splited train im wondring how to evaluate and save best perfroming checkpoint acc is not a relevant eval in this case