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

Error in get_dataset_adapter() in OTX API. "AttributeError: VISUAL_PROMPTING." and "TypeError: get_dataset_adapter() missing 1 required positional argument: 'train_type'". #2394

Open
VishwaBhushanBH opened this issue Jul 24, 2023 · 1 comment
Assignees

Comments

@VishwaBhushanBH
Copy link

Describe the bug
While running the OTX API following this doc , in executing below command,

dataset_adapter = get_dataset_adapter(task_type = model_template.task_type,
                                      # set a path to the root folder of the wgisd repository
                                      train_data_roots="./wgisd",
                                      val_data_roots="./wgisd",
                                      test_data_roots="./wgisd")

1. It is throwing the below error,
TypeError: get_dataset_adapter() missing 1 required positional argument: 'train_type'

Upon adding a parameter "train_type = None" or "train_type = 'Incremental'" referring this

dataset_adapter = get_dataset_adapter(task_type = model_template.task_type,
                                      # set a path to the root folder of the wgisd repository
                                      train_type = None,
                                      train_data_roots="./data/wgisd",
                                      val_data_roots="./data/wgisd",
                                      test_data_roots="./data/wgisd")

2. It is further throwing the below error.

193 if encryption_key is not None:
194     dataset_kwargs["encryption_key"] = encryption_key
196 if self.task_type == TaskType.VISUAL_PROMPTING:
197     if self.data_type in ["coco"]:
198         dataset_kwargs["merge_instance_polygons"] = self.use_mask  # type: ignore[attr-defined]
File ~/anaconda3/envs/JupyterSystemEnv/lib/python3.10/enum.py:437, in EnumMeta.__getattr__(cls, name)
435     return cls._member_map_[name]
436 except KeyError:
437     raise AttributeError(name) from None

AttributeError: VISUAL_PROMPTING

Steps to Reproduce

  1. Install OTX following this
  2. Create OTX format dataset following this
  3. Run the API code following this

Environment:

  • OS:
  • Framework version:
  • Python version: 3.9
  • OpenVINO version:
  • CUDA/cuDNN version:12.0
  • GPU model and memory:
@sungmanc
Copy link
Contributor

Were you using the instance segmentation task?

@sungmanc sungmanc self-assigned this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants