enhanced extraction of training data  from metric history
added todo to check trainData method detection