You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not familiar with Github, so I may be rude.
Thank you for publishing such a great works.
It seems that the constructors of WardEmbeddingsPairwiseSimilarity and WardEmbeddingsCentroidSimilarity did not have self.binary.
Therefore, I could not use any pretrained word embeddings other than the default.
What I Did
In [2]: from octis.evaluation_metrics import similarity_metrics
In [3]: dummy_kv_path = "/workdir/dummy_kv.txt"
In [4]: similarity_metrics.WordEmbeddingsPairwiseSimilarity(word2vec_path=dummy_kv_path)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-c02dac4f77ab> in <module>
----> 1 similarity_metrics.WordEmbeddingsPairwiseSimilarity(word2vec_path=dummy_kv_path)
~/.cache/pypoetry/virtualenvs/sktopic-L2WRRFYm-py3.9/lib/python3.9/site-packages/octis/evaluation_metrics/similarity_metrics.py in __init__(self, word2vec_path, topk)
71 self.wv = api.load('word2vec-google-news-300')
72 else:
---> 73 self.wv = KeyedVectors.load_word2vec_format( word2vec_path, binary=self.binary)
74
75 self.topk = topk
AttributeError: 'WordEmbeddingsPairwiseSimilarity' object has no attribute 'binary'
In [5]: similarity_metrics.WordEmbeddingsCentroidSimilarity(word2vec_path=dummy_kv_path)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-5-1f1c772b67de> in <module>
----> 1 similarity_metrics.WordEmbeddingsCentroidSimilarity(word2vec_path=dummy_kv_path)
~/.cache/pypoetry/virtualenvs/sktopic-L2WRRFYm-py3.9/lib/python3.9/site-packages/octis/evaluation_metrics/similarity_metrics.py in __init__(self, word2vec_path, topk)
115 self.wv = api.load('word2vec-google-news-300')
116 else:
--> 117 self.wv = KeyedVectors.load_word2vec_format(word2vec_path, binary=self.binary)
118 self.topk = topk
119
AttributeError: 'WordEmbeddingsCentroidSimilarity' object has no attribute 'binary'
The text was updated successfully, but these errors were encountered:
I have just released a new version of OCTIS that handles this problem (v 1.10.0). You can run pip install -U octis to download the latest version. Feel free to reopen the issue if you still have problems.
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
Description
I'm not familiar with Github, so I may be rude.
Thank you for publishing such a great works.
It seems that the constructors of
WardEmbeddingsPairwiseSimilarity
andWardEmbeddingsCentroidSimilarity
did not haveself.binary
.Therefore, I could not use any pretrained word embeddings other than the default.
What I Did
The text was updated successfully, but these errors were encountered: