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

Move tidecv dependency to be lazily imported in metrics or add to pyproject.toml #1895

Closed
jprokos26 opened this issue Mar 7, 2023 · 1 comment
Labels
dependencies Pull requests that update a dependency file Feature Request metrics

Comments

@jprokos26
Copy link
Contributor

If trying to use Armory's metrics code, you currently need to have tidecv installed even though it is not listed as a dependency in pyproject.toml. It would be nice to be able to import metrics as such when armory is installed:

from armory.metrics.task import object_detection_AP_per_class

Currently throws:

$ python3 -c "from armory.metrics.task import object_detection_AP_per_class"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jonathan.prokos/git/twosixlabs/armory/armory/metrics/__init__.py", line 4, in <module>
    from armory.metrics import compute, perturbation, statistical, task
  File "/home/jonathan.prokos/git/twosixlabs/armory/armory/metrics/task.py", line 10, in <module>
    from tidecv import TIDE
ModuleNotFoundError: No module named 'tidecv'
@jprokos26 jprokos26 added Feature Request dependencies Pull requests that update a dependency file metrics labels Mar 7, 2023
@mwartell
Copy link
Collaborator

mwartell commented Mar 7, 2023

The package tidecv is present in the engine dependencies group. I suspect you did pip install . aka pip install armory-testbed which just installs the absolute minimum possible to run the armory launcher. If you instead pip install .[engine], then tidecv will be installed.

The expected use is pip install .[pytorch] which includes engine as a dependency component of pytorch. I had not considered wanting metrics without engine. If this assumption is wrong, we should correct that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Feature Request metrics
Projects
None yet
Development

No branches or pull requests

2 participants