Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Nov 20, 2024
1 parent 889b6c8 commit a7d5a9f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion local.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ WORKSPACE_ID = 680
# PROJECT_ID = 41021
SLY_APP_DATA_DIR = "APP_DATA"

TASK_ID = 60447
TASK_ID = 68257
# modal.state.sessionId=66693
1 change: 1 addition & 0 deletions src/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def wrapper(*args, **kwargs):
finally:
with pbar(message="Application is started ...", total=1) as pb:
pb.update(1)
pbar.hide()

return wrapper

Expand Down
45 changes: 29 additions & 16 deletions src/ui/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,59 @@
import src.globals as g
import src.workflow as w
import supervisely as sly
import supervisely.app.widgets as widgets
from supervisely.app.widgets import (
Button,
Card,
Checkbox,
Container,
Editor,
Progress,
ReportThumbnail,
SelectAppSession,
SelectDataset,
SelectProject,
SlyTqdm,
Text,
)
from supervisely.nn.inference.session import SessionJSON

no_classes_label = widgets.Text(
no_classes_label = Text(
"Not found any classes in the project that are present in the model", status="error"
)
no_classes_label.hide()
total_classes_text = widgets.Text(status="info")
selected_matched_text = widgets.Text(status="success")
not_matched_text = widgets.Text(status="warning")
total_classes_text = Text(status="info")
selected_matched_text = Text(status="success")
not_matched_text = Text(status="warning")

sel_app_session = widgets.SelectAppSession(g.team_id, tags=g.deployed_nn_tags, show_label=True)
sel_project = widgets.SelectProject(default_id=None, workspace_id=g.workspace_id)
sel_dataset = widgets.SelectDataset(multiselect=True, compact=True)
sel_app_session = SelectAppSession(g.team_id, tags=g.deployed_nn_tags, show_label=True)
sel_project = SelectProject(default_id=None, workspace_id=g.workspace_id)
sel_dataset = SelectDataset(multiselect=True, compact=True)
sel_dataset.hide()
all_datasets_checkbox = widgets.Checkbox("All datasets", checked=True)
all_datasets_checkbox = Checkbox("All datasets", checked=True)

eval_params = widgets.Editor(
eval_params = Editor(
initial_text=None,
language_mode="yaml",
height_lines=16,
)
eval_params_card = widgets.Card(
eval_params_card = Card(
title="Evaluation parameters",
content=eval_params,
collapsable=True,
)
eval_params_card.collapse()


eval_button = widgets.Button("Evaluate")
eval_button = Button("Evaluate")
eval_button.disable()

eval_pbar = widgets.SlyTqdm()
sec_eval_pbar = widgets.Progress("")
eval_pbar = SlyTqdm()
sec_eval_pbar = Progress("")

report_model_benchmark = widgets.ReportThumbnail()
report_model_benchmark = ReportThumbnail()
report_model_benchmark.hide()

evaluation_container = widgets.Container(
evaluation_container = Container(
[
sel_project,
all_datasets_checkbox,
Expand Down

0 comments on commit a7d5a9f

Please sign in to comment.