Skip to content

Commit

Permalink
Merge pull request #771 from linsword13/summary-foms
Browse files Browse the repository at this point in the history
Use the actual experiment status for success count
  • Loading branch information
douglasjacobsen authored Nov 15, 2024
2 parents fe3cf27 + e192b72 commit 6113835
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/ramble/ramble/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ def is_numeric(value):
# If repeat_success_strict is true, one failed experiment will fail the whole set
# If repeat_success_strict is false, any passing experiment will pass the whole set
repeat_success = False
exp_success = []
exp_status_list = []
for exp in repeat_experiments.keys():
if exp in self.experiment_set.experiments.keys():
exp_inst = self.experiment_set.experiments[exp]
Expand All @@ -1831,15 +1831,15 @@ def is_numeric(value):
else:
continue

exp_success.append(exp_inst.get_status())
exp_status_list.append(exp_inst.get_status())

if workspace.repeat_success_strict:
if experiment_status.FAILED.name in exp_success:
if experiment_status.FAILED.name in exp_status_list:
repeat_success = False
else:
repeat_success = True
else:
if experiment_status.SUCCESS.name in exp_success:
if experiment_status.SUCCESS.name in exp_status_list:
repeat_success = True
else:
repeat_success = False
Expand Down Expand Up @@ -1904,20 +1904,22 @@ def is_numeric(value):

summary_foms = []
if context == _NULL_CONTEXT:
# Use the app name as the origin of the FOM
summary_origin = self.name
n_total_dict = {
"value": self.repeats.n_repeats,
"units": "repeats",
"origin": list(fom_dict.keys())[0][2],
"origin": summary_origin,
"origin_type": "summary::n_total_repeats",
"name": "Experiment Summary",
}
summary_foms.append(n_total_dict)

# Use the first FOM to count how many successful repeats values are present
n_success = exp_status_list.count("SUCCESS")
n_success_dict = {
"value": len(list(fom_dict.values())[0]),
"value": n_success,
"units": "repeats",
"origin": list(fom_dict.keys())[0][2],
"origin": summary_origin,
"origin_type": "summary::n_successful_repeats",
"name": "Experiment Summary",
}
Expand Down

0 comments on commit 6113835

Please sign in to comment.