Skip to content

Commit

Permalink
clean error before new request
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Nov 21, 2023
1 parent 9e05a32 commit 83c0e43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions project-dataset/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from shared_utils.connect import get_model_info, log_settings
from shared_utils.inference import postprocess
from shared_utils.ui2 import clean_error
import init_ui as ui

import sliding_window
Expand All @@ -18,7 +17,6 @@
@sly.timeit
@g.my_app.ignore_errors_and_show_dialog_window()
def connect(api: sly.Api, task_id, context, state, app_logger):
clean_error(api, task_id)
g.model_meta, g.model_info = get_model_info(api, task_id, context, state, app_logger)
if g.model_meta is not None:
actual_ui_state = api.task.get_field(task_id, "state")
Expand Down
2 changes: 2 additions & 0 deletions shared_utils/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
def get_model_info(api: sly.Api, task_id, context, state, app_logger) -> sly.ProjectMeta:
model_meta = None
info = {}

ui.clean_error(api, task_id)
try:
info = api.task.send_request(state["sessionId"], "get_session_info", data={})
log_settings(settings=info, msg="⚙️MODEL SETTINGS⚙️")
Expand Down

0 comments on commit 83c0e43

Please sign in to comment.