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

[BUG] Poutyne breaks deepparse==0.9.13 #239

Open
jarkkojarvinen opened this issue Nov 13, 2024 · 1 comment
Open

[BUG] Poutyne breaks deepparse==0.9.13 #239

jarkkojarvinen opened this issue Nov 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jarkkojarvinen
Copy link

jarkkojarvinen commented Nov 13, 2024

Describe the bug
Latest Poutyne breaks deepparse==0.9.13. Poutyne have dependency in requirements.txt to torchmetrics package without any specific version. There has been released new version of torchmetrics 15 hours ago (v1.6.0). Deepparse package works fine before that.

I recommend to use specific versions in Python packages to avoid these issues.

To Reproduce
Install deepparse==0.9.13 and use any existing code

Expected behavior
Should work without any issues

Logs

annotation          |   File "/app/src/main.py", line 9, in <module>
annotation          |     from deepparse.parser.address_parser import AddressParser
annotation          |   File "/opt/venv/lib/python3.12/site-packages/deepparse/__init__.py", line 4, in <module>
annotation          |     from .validations import *
annotation          |   File "/opt/venv/lib/python3.12/site-packages/deepparse/validations.py", line 3, in <module>
annotation          |     import poutyne
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/__init__.py", line 21, in <module>
annotation          |     from .framework import *
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/__init__.py", line 22, in <module>
annotation          |     from .experiment import *
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/experiment.py", line 20, in <module>
annotation          |     from poutyne.framework.model_bundle import ModelBundle
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/model_bundle.py", line 55, in <module>
annotation          |     from poutyne.framework.model import Model
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/model.py", line 35, in <module>
annotation          |     from poutyne.framework.metrics import flatten_metric_names, get_callables_and_names, get_metric, rename_doubles
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/metrics/__init__.py", line 24, in <module>
annotation          |     from .predefined import *
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/metrics/predefined/__init__.py", line 2, in <module>
annotation          |     from .fscores import *
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/metrics/predefined/fscores.py", line 46, in <module>
annotation          |     from poutyne.framework.metrics.predefined.bincount import _bincount
annotation          |   File "/opt/venv/lib/python3.12/site-packages/poutyne/framework/metrics/predefined/bincount.py", line 43, in <module>
annotation          |     from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12
annotation          | ImportError: cannot import name '_TORCH_GREATER_EQUAL_1_12' from 'torchmetrics.utilities.imports' (/opt/venv/lib/python3.12/site-packages/torchmetrics/utilities/imports.py). Did you mean: '_TORCH_GREATER_EQUAL_2_1'?
annotation exited with code 1

Desktop

  • OS: Ubuntu
  • Version 22.04

Additional info
See links:

@jarkkojarvinen jarkkojarvinen added the bug Something isn't working label Nov 13, 2024
@jarkkojarvinen
Copy link
Author

Workaround before fix is to install torchmetrics==1.5.2

For example requirements.txt:

torchmetrics==1.5.2
deepparse==0.9.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant