Skip to content

Commit

Permalink
additional exp tools
Browse files Browse the repository at this point in the history
  • Loading branch information
djpasseyjr committed Feb 29, 2024
1 parent 611a08e commit 272cc52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions experiments/exp1/runner/exp_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ def load_results(outfile_idx: str, dynamic_model_args: dict):
"complete": False,
**dynamic_model_args
}
# Save empty results dict.
save_results_dict(results, outfile_idx)

return results

Expand Down
7 changes: 4 additions & 3 deletions experiments/exp1/runner/test_exp_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ def test_result_load_and_save():

results = exp_tools.load_results(EXP_IDX, DYN_ARGS)

# Check that the file was written.
assert OUTFILE.exists()

# Check that the dict has the correct format
for key in ["dynamic_sim_complete", "methods", "model_type"]:
assert key in results
Expand All @@ -57,6 +54,10 @@ def test_result_load_and_save():
results["complete"] = True

exp_tools.save_results_dict(results, EXP_IDX)

# Check that the file was written.
assert OUTFILE.exists()

results = exp_tools.load_results(EXP_IDX, DYN_ARGS)
assert results["complete"]

Expand Down

0 comments on commit 272cc52

Please sign in to comment.