Yeah, the attribute is obviously there before scripting. My questions are:

Why scripting removes this attribute when it is used only in torch.jit.ignore'ed methods?
Is there a good way to make torch.jit.script not remove this attribute? I can just do m.f = f to assign it again after scripting, but this is fairly ugly when you have many attributes.