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

default force rerun to false #167

Merged
merged 2 commits into from
Nov 21, 2023
Merged

Conversation

kordc
Copy link
Collaborator

@kordc kordc commented Nov 19, 2023

As we're talking about it several times before I propose this solution. For now even when we add an extra info to the logger all steps will be re-run. As we provide the rerun flag I thik it'd be beneficial for everyone of we default the rerun to false and just infor the user about the need of the rerun when the model code was changed.

If you feel differently feel free to open the discussion below

#155

As we're talking about it several times before I propose this solution.
For now even when we add an extra info to the logger all steps
will be re-run. As we provide the rerun flag I thik it'd be beneficial
for everyone of we default the rerun to false and just infor the user
about the need of the rerun when the model code was changed.

If you feel differently feel free to open the discussion below

#155
@kordc kordc requested review from trebacz626 and SebChw November 19, 2023 12:14
@SebChw
Copy link
Owner

SebChw commented Nov 19, 2023

I completely agree. Just inform that they should rerun it

art/project.py Outdated
@@ -162,25 +162,23 @@ def check_if_must_be_run(self, step: "Step", checks: List[Check]) -> bool:
Returns:
bool: True if the step must be run, False otherwise.
"""
step_current_hash = step.get_hash()
step_saved_hash = step.get_latest_run()["hash"]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we get_latest_run if step was not run? I'd put this below

art/project.py Outdated
if not step.was_run():
return True
return True, model_changed
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If step was not run how can model even change. I'd return False by default

art/project.py Outdated
if not step.was_run():
return True
return True, model_changed
else:
try:
self.check_checks(step, checks)
except Exception as e:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you didn't change it but we should catch CheckFailedException

art/project.py Outdated
@@ -191,13 +189,18 @@ def run_all(self, force_rerun=False):
"""
run_id = get_run_id()
logger_id = add_logger(EXPERIMENT_LOG_DIR / get_new_log_file_name(run_id))
changed_steps = []
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function shouldn't be responsible for collecting changed_steps. I'd create self.changed_steps and make changes inside check_if_must_be_run

art/project.py Outdated
@@ -215,14 +218,14 @@ def run_all(self, force_rerun=False):
self.fill_step_states(step)
step.save_to_disk()

self.print_summary()
self.print_summary(changed_steps)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here I wouldn't require parameter to be passed. Print summary can be aware of changed steps

@SebChw SebChw merged commit dbcf43e into develop Nov 21, 2023
@SebChw SebChw deleted the kcyganik-rerun-false-on-default branch November 21, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants