Giter Club home page Giter Club logo

Comments (6)

mjpost avatar mjpost commented on May 8, 2024

Looks like I need torch >= 1.4. Somehow poetry install didn't pick up on this, or I have a venv problem. Maybe it should be added to requirements.txt?

from comet.

maxiek0071 avatar maxiek0071 commented on May 8, 2024

Hi @mjpost,

I install unbabel-comet in a Python venv 3.7.12. I am also experiencing the same issue:

Traceback (most recent call last):
  File "/home/ubuntu/unbabel-comet-1.0.1/venv/bin/comet-score", line 5, in <module>
    from comet.cli.score import score_command
  File "/home/ubuntu/unbabel-comet-1.0.1/venv/lib/python3.7/site-packages/comet/__init__.py", line 19, in <module>
    from .download_utils import download_model
  File "/home/ubuntu/unbabel-comet-1.0.1/venv/lib/python3.7/site-packages/comet/download_utils.py", line 26, in <module>
    from comet.models import available_metrics
  File "/home/ubuntu/unbabel-comet-1.0.1/venv/lib/python3.7/site-packages/comet/models/__init__.py", line 17, in <module>
    from .regression.regression_metric import RegressionMetric
  File "/home/ubuntu/unbabel-comet-1.0.1/venv/lib/python3.7/site-packages/comet/models/regression/regression_metric.py", line 26, in <module>
    from comet.models.base import CometModel
  File "/home/ubuntu/unbabel-comet-1.0.1/venv/lib/python3.7/site-packages/comet/models/base.py", line 41, in <module>
    class OrderedSampler(Sampler[int]):
TypeError: 'type' object is not subscriptable

when I call comet-score. I installed torch version 1.4.0, however the problem still persists.

Would you know how to fix this?

Thank you for your help.

from comet.

mjpost avatar mjpost commented on May 8, 2024

I ended up with torch version 1.10.0. I suggest you double-check that comet-score isn't linking to an old version, maybe installed elsewhere. I think I solved my problems after running pip uninstall both as the regular user and root, and then reinstalling.

from comet.

mjpost avatar mjpost commented on May 8, 2024

I just ran into this again today. There were two problems: first, comet 1.0.1 was installed in ~/.local/bin, and comet 0.1.0 in the system bin directory. I had to do pip uninstall unbabel-comet as both my regular user and root. Then, I got the error with pytorch 1.6.0. After upgrading to 1.10.2, all is well.

from comet.

maxiek0071 avatar maxiek0071 commented on May 8, 2024

Yes, with torch version 1.10.0, it works very well. Would this mean that the requirements for the package should be adjusted?

from comet.

mjpost avatar mjpost commented on May 8, 2024

I would think so. You might try submitting a PR referencing this issue.

from comet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.