def save_score(self): dump_json( self.epoch_scores, os.path.join( self.output_dir_path, 'score.json', ), )
def setup_output_dir(output_dir_path, args): os.makedirs(output_dir_path, exist_ok=True) dump_json(args, os.path.join(output_dir_path, 'args.json'))
def setup_output_dir(output_dir_path, args, model_params, optimizer_params): os.makedirs(output_dir_path, exist_ok=True) dump_json(args, os.path.join(output_dir_path, 'args.json')) dump_json(model_params, os.path.join(output_dir_path, 'model.json')) dump_json(optimizer_params, os.path.join(output_dir_path, 'optimizer.json'))