Output is what is returned by evaluator’s process_function :  https://pytorch.org/ignite/metrics.html 3

I’m using BCEWithLogitsLoss, so I have to pass logits through a sigmoid function. I have to use a sigmoid here as well, right?

Well, it depends on your choice how to define whether logit’s value is sufficient to be interpreted as 1.
Yes, it is more convenient to pass to “probabilties” using sigmoid and then apply a thresholding (0.5) as you put to your version of thresholded_output_transform.
Here is another way to apply the thresholding:
t = 0.55

def thresholded_output_transform(output):
    y_pred, y = output 
    y_pred = torch.sigmoid(y_pred)
    y_pred = (y_pred > t).float()
    return y_pred, y