Right now everything that is in a @torch.jit.scripted class has to be TorchScript compatible, but we’re working on fixing it so @ignore and @unused work as they should. The best way around it for now is probably to use free-standing functions (which you can @ignore) that take the object as the first argument