Skip to content

Commit

Permalink
Update the load overrides function
Browse files Browse the repository at this point in the history
  • Loading branch information
syhwawa committed Nov 20, 2023
1 parent 68bea5e commit 200ecd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mc/autostep.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,13 @@ def dump_log_to_disk(log: list, path):


def load_overrides(overrides_path: Path) -> dict:
if not overrides_path.exists():
logging.warning(f"Overrides file not found: {overrides_path}")
return {}
with open(overrides_path) as o:
overrides = json.loads(o.read())
result = {}
for i, val in enumerate(overrides):
for val in overrides:
for k, v in val.items():
result[k] = v
return result

0 comments on commit 200ecd1

Please sign in to comment.