@pytorchnewbie sorry I saw the question but forgot to answer.
If I understand correctly the problem, you would like to compute MSE metric (https://pytorch.org/ignite/metrics.html#ignite.metrics.MeanSquaredError 10).
To do that create a validation engine and attach MSE metric to that:
from ignite.engine import create_supervised_evaluator
from ignite.metrics import MeanSquaredError

val_metrics = {
    "mse": MeanSquaredError(),
}
evaluator = create_supervised_evaluator(model, metrics=val_metrics)

res = evaluator.run(val_loader)
print(res.metrics["mse"])


Also, what is the difference between the trainer which returns an “output” and the evaluator which returns the infer_dict?

Output of an engine is not restricted at all, but should be coherent with how we would like to use it after inside attached handlers/metrics. See concepts 1 for more details.
If we would like to log batch loss during the training, then we need logically to return its value. But in addition if we would like to do something with predictions or compute another error metric etc we can also put everything into output and work with the output inside attached handler.
Same for validation engine. If we use it to compute metrics, we need to output predictions and target. If we set it to do inference=compute prediction and write the prediction after inside a save_handler. We output only predictions…
Hope it is more clear.

So I’d assume the “attach” stores the history, but then the link above specifically says that it doesn’t?

It depends on metric. Some metric can compute in online manner: storing only certain internal variables. For example, MSE = 1/N sum ( sample_err^2 ). It can be computed as accumulation of all sample_err^2 and finally divided by number of seen samples. So, practically, we do not store a list of [y_pred1, y_pred2, ...] and [y1, y2, ...] to compute sample_err etc.
But there are metrics, e.g. median “something” error that can not be computed like that and we need to store two lists and execute computation on stored history.
You can also compute any metric on the training dataset during the training (see here how to do this). But, in this case you should be aware of the fact that model is also changing. So, it means that first predictions in the begining of an epoch will be worse than the last ones, but everything will be accounted to compute final overall training dataset metric. For example, accuracy on an epoch of 3 batches (bs=16) can give the following: num_correct_per_batch = [0, 4, 8]. Final accuracy is (0 + 4 + 8) / (16 + 16 + 16). However, on validation it could give (8 + 8 + 8)/(16 + 16 + 16).
Please, let me know if it answers your questions.