Skip to content

Commit

Permalink
convert yaml to dict
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Oct 10, 2024
1 parent d20a8ef commit d0777e8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main_func():

pbar.show()
sec_pbar.show()
evaluation_parameters = eval_params.get_value()
evaluation_parameters = yaml.safe_load(eval_params.get_value())
if task_type == "object detection":
bm = ObjectDetectionBenchmark(
api,
Expand Down Expand Up @@ -123,7 +123,7 @@ def main_func():
sel_project = widgets.SelectProject(default_id=None, workspace_id=g.workspace_id)

eval_params = widgets.Editor(
initial_text=BaseEvaluator._get_default_evaluation_params(),
initial_text=None,
language_mode="yaml",
height_lines=16,
)
Expand Down Expand Up @@ -195,10 +195,10 @@ def update_eval_params():
g.session = SessionJSON(g.api, g.session_id)
task_type = g.session.get_deploy_info()["task_type"]
if task_type == TaskType.OBJECT_DETECTION:
params = ObjectDetectionEvaluator._get_default_evaluation_params()
params = ObjectDetectionEvaluator.load_yaml_evaluation_params()
elif task_type == TaskType.INSTANCE_SEGMENTATION:
params = InstanceSegmentationEvaluator._get_default_evaluation_params()
eval_params.set_text(yaml.dump(params), language_mode="yaml")
params = InstanceSegmentationEvaluator.load_yaml_evaluation_params()
eval_params.set_text(params, language_mode="yaml")
eval_params_card.uncollapse()


Expand Down

0 comments on commit d0777e8

Please sign in to comment.