Generally, we recommend using an AutoClass to produce checkpoint-agnostic code.