// options
parser = argparse.ArgumentParser()
parser.add_argument("-opt", type=str, required=True, help="Path to options JSON file.")
args = parser.parse_args()
options_path = args.opt
opt = option.parse(options_path, is_train=True)
util.mkdir_and_rename(opt["path"]["experiments_root"]) // rename old experiments if exists
After Change
// options
parser = argparse.ArgumentParser()
parser.add_argument("-opt", type=str, required=True, help="Path to options JSON file.")
opt = option.parse(parser.parse_args().opt, is_train=True)
util.mkdir_and_rename(opt["path"]["experiments_root"]) // rename old experiments if exists
util.mkdirs((path for key, path in opt["path"].items() if not key == "experiments_root" and \