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

Upgrade Supervisely SDK to v6.73.111. Added Exception Handler for container crashes #75

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
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
18 changes: 14 additions & 4 deletions agent/worker/task_logged.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,25 @@ def end_log_stop(self):
return sly.EventType.TASK_STOPPED

def end_log_crash(self, e):
exc_str = traceback.format_exc()
from supervisely.io.exception_handlers import handle_exception

trace_str = traceback.format_exc()

handled_exc = handle_exception(e)
if handled_exc is not None:
exit_status = handled_exc.title
exc_str = handled_exc.get_message_for_exception()
else:
exit_status = str(e)
exc_str = repr(e)

self.logger.warn(
"TASK_END",
extra={
"event_type": sly.EventType.TASK_CRASHED,
"exit_status": str(e),
"exc_str": repr(e),
"trace": exc_str,
"exit_status": exit_status,
"exc_str": exc_str,
"trace": trace_str,
},
)
return sly.EventType.TASK_CRASHED
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ grpcio-tools==1.47.0
# py3exiv2==0.9.3
packaging==21.3
version-parser==1.0.1
supervisely==6.72.203
supervisely==6.73.111
docker==3.3.0
black
python-slugify==6.1.2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ filelock==3.13.1
torch==1.7.1+cu110
torchvision==0.8.2+cu110
-f https://download.pytorch.org/whl/torch_stable.html
supervisely==6.73.24
supervisely==6.73.111
# for development
# supervisely @ git+https://github.com/supervisely/supervisely.git@dev-branch
Loading