Use python3 compatible exception style in modeling.py. Addressing PR on github from cclauss.
Use python3 compatible exception style in modeling.py. Addressing PR on github from cclauss.

PiperOrigin-RevId: 214476720

google/deepvariant,google/deepvariant,google/deepvariant