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

Raise errors from run_training #151

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

booxter
Copy link
Contributor

@booxter booxter commented Jul 24, 2024

No description provided.

@booxter
Copy link
Contributor Author

booxter commented Jul 24, 2024

Completely untested, just spitballing since I noticed that training failure doesn't break workflow tests for some reason.

@booxter booxter changed the title DNM: Attempt to make run_training error on error Raise errors from run_training Jul 26, 2024
The library shouldn't (just) print errors; it should raise errors and
let callers deal with them.

This patch also makes the function raise RuntimeError when training
process returns a non-zero return code, or when it times out on waiting
for exit.

ilab cli already handles all Exceptions raised by the function.
KeyboardInterrupt won't be caught by this exception handler since it's
not Exception (but BaseException), but it's handled by click library
instead [1].

The intent of this patch is to make `ilab train` fail with non-zero
return code when training routine failed.

[1] https://click.palletsprojects.com/en/7.x/exceptions/#where-are-errors-handled

Signed-off-by: Ihar Hrachyshka <[email protected]>
Copy link

This pull request has been automatically marked as stale because it has not had activity within 90 days. It will be automatically closed if no further activity occurs within 30 days.

@github-actions github-actions bot added the stale label Oct 25, 2024
Copy link
Contributor

mergify bot commented Oct 25, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. @booxter please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Oct 25, 2024
@github-actions github-actions bot removed the stale label Oct 26, 2024
@mergify mergify bot removed the needs-rebase label Dec 17, 2024
Copy link
Contributor

mergify bot commented Dec 17, 2024

This pull request has merge conflicts that must be resolved before it can be
merged. @booxter please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant