That works, but it diminishes the value of the warning - if I make a mistake in some refactor and the inputs end up being requires_grad=False even for the training case, it will no longer warn me of that.
I don’t trust myself, so I think I’ll go with self.training - it may still trigger the warning incorrectly if my module is called in some different way that I’m not aware of (with no_grad without eval()), but I’d rather have too many warnings than too few.