in understanding_rl_vision/rl_clarity/training.py [0:0]
def save_data(*, save_dir, args_dict, params, step=None, extra={}):
"""
Save the global config object as well as the current model params to a local file
"""
data_dict = dict(args=args_dict, params=params, extra=extra, time=time.time())
step_str = "" if step is None else f"-{step}"
save_path = os.path.join(save_dir, f"checkpoint{step_str}.jd")
if "://" not in save_dir:
os.makedirs(save_dir, exist_ok=True)
save_joblib(data_dict, save_path)
return save_path