Skip to content

Commit

Permalink
Update ImgAug layer settings, handle unavailable project id in AddtoE…
Browse files Browse the repository at this point in the history
…xistingProject layer
  • Loading branch information
cxnt committed Aug 1, 2024
1 parent 1e61bd9 commit bc4742a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/ui/dtl/actions/imgaug_augs/studio/imgaug_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def _set_settings_from_json(settings: dict):
nonlocal saved_settings
pipeline_json = settings.get("pipeline", [])
shuffle = settings.get("shuffle", False)
classes_to_convert = settings.get("classes_to_convert", {})
sidebar_layout_pipeline.from_json(pipeline_json, shuffle)
saved_settings = {
"pipeline": pipeline_json,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,12 @@ def create_options(src: list, dst: list, settings: dict) -> dict:
else:
project_id = int(dst)

dst_project_selector.set_project_id(project_id)
dst_dataset_options_existing_dataset_selector.set_project_id(project_id)
try:
dst_project_selector.set_project_id(project_id)
dst_dataset_options_existing_dataset_selector.set_project_id(project_id)
except:
# dst_project_selector.set_project_id(project_id)
dst_dataset_options_existing_dataset_selector.set_project_id(None)

_update_preview()

Expand Down

0 comments on commit bc4742a

Please sign in to comment.