Maybe I do not correctly understand the issue, but if you would like to run model evaluation every 20-th epochs and in the end of the training it is simply done like :

trainer = ...
evaluator = ...


@trainer.on(Events.EPOCH_COMPLETED(every=20) | Events.COMPLETED)
def validate_model():
    state = evaluator.run(val_loader)
    print(trainer.state.epoch, state.metrics)


@pytorchnewbie, what do you think? Does it answer your question ?