Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only print task baseline status if basline compared #133

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions polaris/run/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,16 +335,21 @@ def _log_and_run_task(task, stdout_logger, task_logger, quiet,
status = f' task execution: {run_status}'
if task_pass:
stdout_logger.info(status)
if baselines_passed:
baseline_str = pass_str
if baselines_passed is None:
result_str = pass_str
success = True
else:
baseline_str = fail_str
result_str = fail_str
success = False
status = f' baseline comp.: {baseline_str}'
stdout_logger.info(status)
if baselines_passed:
baseline_str = pass_str
result_str = pass_str
success = True
else:
baseline_str = fail_str
result_str = fail_str
success = False
status = f' baseline comp.: {baseline_str}'
stdout_logger.info(status)

else:
stdout_logger.error(status)
if not is_task:
Expand All @@ -367,7 +372,7 @@ def _run_task(task, available_resources):
"""
logger = task.logger
cwd = os.getcwd()
baselines_passed = True
baselines_passed = None
for step_name in task.steps_to_run:
step = task.steps[step_name]
complete_filename = os.path.join(step.work_dir,
Expand Down Expand Up @@ -419,7 +424,9 @@ def _run_task(task, available_resources):
baseline_str = fail_str
_print_to_stdout(task,
f' baseline comp.: {baseline_str}')
if not status:
if baselines_passed is None:
baselines_passed = status
elif not status:
baselines_passed = False

_print_to_stdout(task,
Expand Down