openvinotoolkit / training_extensions

Train, Evaluate, Optimize, Deploy Computer Vision Models via OpenVINO™
https://openvinotoolkit.github.io/training_extensions/
Apache License 2.0
1.14k stars 443 forks source link

OTX v2 visual prompting tasks cannot load datumaro datasets #3227

Open goodsong81 opened 7 months ago

goodsong81 commented 7 months ago

Describe the bug

                                                                                          ver.2.0.0                                                                                         Traceback (most recent call last):
  File "/home/songkich/miniconda3/envs/otx-v2/bin/otx", line 8, in <module>                                                                                                                     sys.exit(main())
             ^^^^^^
  File "/mnt/sdb/workarea/otx/src/otx/cli/__init__.py", line 17, in main
    OTXCLI()                                                                                                                                                                                  File "/mnt/sdb/workarea/otx/src/otx/cli/cli.py", line 56, in __init__
    self.run()
  File "/mnt/sdb/workarea/otx/src/otx/cli/cli.py", line 570, in run                                                                                                                             self.instantiate_classes()
  File "/mnt/sdb/workarea/otx/src/otx/cli/cli.py", line 349, in instantiate_classes                                                                                                             self.config_init = self.parser.instantiate_classes(self.config)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/jsonargparse/_deprecated.py", line 140, in patched_instantiate_classes
    cfg = self._unpatched_instantiate_classes(cfg, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/jsonargparse/_core.py", line 1182, in instantiate_classes
    cfg[subcommand] = subparser.instantiate_classes(cfg[subcommand], instantiate_groups=instantiate_groups)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/jsonargparse/_deprecated.py", line 140, in patched_instantiate_classes
    cfg = self._unpatched_instantiate_classes(cfg, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/jsonargparse/_core.py", line 1176, in instantiate_classes
    component.instantiate_class(component, cfg)
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/jsonargparse/_signatures.py", line 577, in group_instantiate_class
    parent[key] = instantiator_fn(group.group_class, **value)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/jsonargparse/_common.py", line 109, in default_class_instantiator
    return class_type(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/sdb/workarea/otx/src/otx/core/data/module.py", line 59, in __init__
    dataset = DmDataset.import_from(self.config.data_root, format=self.config.data_format)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/datumaro/components/dataset.py", line 816, in import_from
    importer(path, stream=cls._stream, **kwargs)
  File "/home/songkich/miniconda3/envs/otx-v2/lib/python3.11/site-packages/datumaro/plugins/data_formats/coco/importer.py", line 74, in __call__
    raise DatasetNotFoundError(path, self.NAME)
datumaro.components.errors.DatasetNotFoundError: Failed to find dataset 'coco_instances' at '/mnt/sdc/val-data/v2/zero_shot_visual_prompting/coco_car_person_medium_datumaro'

Steps to Reproduce

On the latest releases/2.0.0 branch (b55d82cf6)

otx train --config src/otx/recipe/zero_shot_visual_prompting/sam_tiny_vit.yaml --data_root /mnt/sdc/val-data/v2/zero_shot_visual_prompting/coco_car_person_medium_datumaro --work_dir /tmp/zvp

Same goes for visual_prompting task models.

Environment:

sungchul2 commented 7 months ago

Could you add --data.config.data_format=datumaro in cli?

goodsong81 commented 7 months ago

Could you add --data.config.data_format=datumaro in cli?

I've removed that part after auto-config implemented. Feel free to assign this issue to @harimkang

harimkang commented 7 months ago

For now, let's revise the milestone for this to 2.1.0.

harimkang commented 5 months ago

@goodsong81 i create PR for this : https://github.com/openvinotoolkit/training_extensions/pull/3579

harimkang commented 3 months ago

We find an issue with the feature, revert the PR https://github.com/openvinotoolkit/training_extensions/pull/3579, and re-open the issue. It may be added at a later date, either in a different way or when the issue is resolved in datumaro.