in benchmarking/run_bench.py [0:0]
def _getSavedArgs(self):
new_args = self._getUnknownArgs()
if (
self.args.reset_options
or not os.path.isdir(self.root_dir)
or not os.path.isfile(os.path.join(self.root_dir, "config.txt"))
):
args = self._saveDefaultArgs(new_args)
else:
args = {}
tiered_configs = ["config.txt", "config_overrides.txt"]
for config in tiered_configs:
config_file = os.path.join(self.root_dir, config)
if os.path.isfile(config_file):
with open(config_file, "r") as f:
args.update(json.load(f))
for v in new_args:
if v in args:
del args[v]
if "--lab" in new_args:
if "--remote" in args:
del args["--remote"]
return args