Skip to content

Commit

Permalink
save aliases when dumping pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Aug 9, 2023
1 parent 8dac3c3 commit 889b765
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ceci/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,9 @@ def save(self, pipefile, stagefile=None, reduce_config=False):
classname=val.class_name,
nprocess=val.nprocess,
module_name=val.module_name,
aliases=val.aliases,
)

if val.threads_per_process != 1:
pipe_stage_info["threads_per_process"] = val.threads_per_process
pipe_info_list.append(pipe_stage_info)
Expand Down Expand Up @@ -902,12 +904,12 @@ def save(self, pipefile, stagefile=None, reduce_config=False):
pipe_dict["site"] = site
with open(pipefile, "w") as outfile:
try:
yaml.dump(pipe_dict, outfile)
yaml.dump(pipe_dict, outfile, sort_keys=False)
except Exception as msg: # pragma: no cover
print(f"Failed to save {str(pipe_dict)} because {msg}")
with open(stagefile, "w") as outfile:
try:
yaml.dump(stage_dict, outfile)
yaml.dump(stage_dict, outfile, sort_keys=False)
except Exception as msg: # pragma: no cover
print(f"Failed to save {str(stage_dict)} because {msg}")

Expand Down

0 comments on commit 889b765

Please sign in to comment.