wenquanlu / HandRefiner

MIT License
701 stars 30 forks source link

Not Compatible with new versions of torch #22

Closed landmann closed 5 months ago

landmann commented 5 months ago

I get this error

Traceback (most recent call last):
  File "/home/ubuntu/notebooks/HandRefiner/handrefiner.py", line 28, in <module>
    from pytorch_lightning import seed_everything
  File "/home/ubuntu/myenv/lib/python3.10/site-packages/pytorch_lightning/__init__.py", line 20, in <module>
    from pytorch_lightning import metrics  # noqa: E402
  File "/home/ubuntu/myenv/lib/python3.10/site-packages/pytorch_lightning/metrics/__init__.py", line 15, in <module>
    from pytorch_lightning.metrics.classification import (  # noqa: F401
  File "/home/ubuntu/myenv/lib/python3.10/site-packages/pytorch_lightning/metrics/classification/__init__.py", line 14, in <module>
    from pytorch_lightning.metrics.classification.accuracy import Accuracy  # noqa: F401
  File "/home/ubuntu/myenv/lib/python3.10/site-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in <module>
    from pytorch_lightning.metrics.utils import deprecated_metrics, void
  File "/home/ubuntu/myenv/lib/python3.10/site-packages/pytorch_lightning/metrics/utils.py", line 22, in <module>
    from torchmetrics.utilities.data import get_num_classes as _get_num_classes
ImportError: cannot import name 'get_num_classes' from 'torchmetrics.utilities.data' (/home/ubuntu/myenv/lib/python3.10/site-packages/torchmetrics/utilities/data.py)

And it seems like the library was deleted https://stackoverflow.com/questions/71971105/importerror-cannot-import-name-x-from-y