Comments (6)
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.
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.
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.
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.
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.
I would think so. You might try submitting a PR referencing this issue.
from comet.
Related Issues (20)
- [QUESTION] AttributeError: An error occurred during model prediction: 'dict' object has no attribute 'scores' HOT 5
- AttributeError: 'dict' object has no attribute 'scores' when using the model 'Unbabel/wmt22-cometkiwi-da' HOT 4
- When loading huggingface Unbabel/wmt22-cometkiwi-da checkpoint, UnpicklingError
- [QUESTION] Unable to use ReLU as activation function HOT 4
- [QUESTION] Keep getting scores of '0' no matter what input used HOT 5
- HF Hub dependency conflicts with latest `tranformers` version. HOT 3
- if tgt is same with src, the score is still high HOT 2
- [QUESTION] Train UnifiedMetric/XCOMET with word level predictions. HOT 1
- Sparsemax not actually used in COMET-KIWI, XCOMET-XL/XXL HOT 4
- Invalid link reference of reference-free model in readme
- Minimizing cpu RAM vs only use GPU RAM HOT 1
- what is the precision when load_from_checkpoint?
- Runtime error when loading wmt23-cometkiwi-da-xl HOT 1
- Different scores from different COMET package versions 1.1.2 and 2.2.1 HOT 2
- Different versions of COMET code give different scores with the same model and date.
- [QUESTION] large file scoring HOT 3
- [QUESTION] Splitting big models over multiple GPUs HOT 6
- [QUESTION] Memory footprint HOT 21
- [INPUT] Text Length of Input (source, reference, and hypothesis) HOT 2
- Change the global variable logger to comet_logger HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comet.