def save_optimizer_for_phase(phase):
    """
    Save the optimizer associated with the phase as a pickle
    """
    with open(make_optimizer_pickle_path(phase), "w+b") as f:
        f.write(pickle.dumps(phase.optimizer))
def save_optimizer_for_phase ( phase ) : with open ( make_optimizer_pickle_path ( phase ) , "w+b" ) as f : f . write ( pickle . dumps ( phase . optimizer ) )
Save the optimizer associated with the phase as a pickle