openvinotoolkit / datumaro

Dataset Management Framework, a Python library and a CLI tool to build, analyze and manage Computer Vision datasets.
https://openvinotoolkit.github.io/datumaro/
MIT License
526 stars 129 forks source link

DeprecationWarning: We are planning to clean up the entities in datumaro/__init__.py until datumaro==1.5.0. #1556

Open irmo322 opened 3 months ago

irmo322 commented 3 months ago

Hi,

Executing this simple test_dm.py with pytest shows a DeprecationWarning:

import datumaro as dm

def test_dm_bbox():
    bbox = dm.Bbox(1, 2, 3, 4)
$ pytest test_dm.py
============================================================================================================================= test session starts =============================================================================================================================
platform linux -- Python 3.10.9, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/benjamin/Desktop/test_datumaro
plugins: hydra-core-1.3.2
collected 1 item                                                                                                                                                                                                                                                              

test_dm.py .                                                                                                                                                                                                                                                            [100%]

============================================================================================================================== warnings summary ===============================================================================================================================
venv_datumaro/lib/python3.10/site-packages/datumaro/__init__.py:7
  /home/benjamin/Desktop/test_datumaro/venv_datumaro/lib/python3.10/site-packages/datumaro/__init__.py:7: DeprecationWarning: We are planning to clean up the entities in datumaro/__init__.py until datumaro==1.5.0. This will affect the following import pattern: "import datumaro as dm; dm.<entity>". If you are using this pattern in your code, please revisit it after upgrading datumaro>=1.5.0.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

The warning mentions datumaro>=1.5.0. Datumaro is already at version 1.7.0 and the documentation is not mentioning what pattern should be used instead of import datumaro as dm; dm.<entity>.