Trainer param annotation, model cache expiry based on time and size and
test fixes