Skip to content

Commit

Permalink
Add output files to missing CLI functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Feb 27, 2025
1 parent 8d3c8e7 commit 4e13369
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions janus_core/cli/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ def preprocess(

inputs = {"mlip_config": str(mlip_config)}

# Save summary information before preprocessing begins
start_summary(command="preprocess", summary=summary, inputs=inputs)

log_kwargs = {"filemode": "w"}
if log:
log_kwargs["filename"] = log

output_files = {"log": log}

# Save summary information before preprocessing begins
start_summary(
command="preprocess", summary=summary, inputs=inputs, output_files=output_files
)

# Run preprocessing
run_preprocess(
mlip_config, attach_logger=True, log_kwargs=log_kwargs, track_carbon=tracker
Expand Down
10 changes: 7 additions & 3 deletions janus_core/cli/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,17 @@ def train(

inputs = {"mlip_config": str(mlip_config), "fine_tune": fine_tune}

# Save summary information before training begins
start_summary(command="train", summary=summary, inputs=inputs)

log_kwargs = {"filemode": "w"}
if log:
log_kwargs["filename"] = log

output_files = {"log": log}

# Save summary information before training begins
start_summary(
command="train", summary=summary, inputs=inputs, output_files=output_files
)

# Run training
run_train(
mlip_config, attach_logger=True, log_kwargs=log_kwargs, track_carbon=tracker
Expand Down

0 comments on commit 4e13369

Please sign in to comment.