This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import orbax.checkpoint as ocp | |
from orbax.checkpoint.checkpoint_managers import preservation_policy | |
from orbax.checkpoint.checkpoint_managers import save_decision_policy | |
options = ocp.CheckpointManagerOptions( | |
save_decision_policy=save_decision_policy.FixedIntervalPolicy(100), | |
preservation_policy=preservation_policy.AnyPreservationPolicy( | |
[ | |
preservation_policy.LatestN(1), | |
preservation_policy.EveryNSteps(1_000), |