-
Notifications
You must be signed in to change notification settings - Fork 21
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
Problem Installing Responsilby #66
Comments
I am getting the same error on Mac M1 Ventura running Python 3.10 in a fresh conda environment. Bradley's screenshot does not contain the error message he mentioned in his comment, so here is a full traceback of the gensim error: ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 from responsibly.dataset import COMPASDataset
File ~/anaconda3/envs/seldo_responsibly/lib/python3.10/site-packages/responsibly/__init__.py:3
1 # pylint: disable=line-too-long
----> 3 from responsibly import fairness, we
6 __project__ = 'responsibly'
7 __description__ = 'Toolkit for Auditing and Mitigating Bias and Fairness of Machine Learning Systems 🔎🤖🧰'
File ~/anaconda3/envs/seldo_responsibly/lib/python3.10/site-packages/responsibly/we/__init__.py:48
1 """
2 Metrics and debiasing for bias (such as gender and race) in word embedding.
3
(...)
45
46 """
---> 48 from responsibly.we.bias import BiasWordEmbedding, GenderBiasWE
49 from responsibly.we.data import load_w2v_small
50 from responsibly.we.utils import most_similar
File ~/anaconda3/envs/seldo_responsibly/lib/python3.10/site-packages/responsibly/we/bias.py:93
91 from responsibly.we.benchmark import evaluate_word_embedding
92 from responsibly.we.data import BOLUKBASI_DATA, OCCUPATION_FEMALE_PRECENTAGE
---> 93 from responsibly.we.utils import (
94 assert_gensim_keyed_vectors, cosine_similarity, generate_one_word_forms,
95 generate_words_forms, get_seed_vector, most_similar, normalize,
96 plot_clustering_as_classification, project_params, project_reject_vector,
97 project_vector, reject_vector, round_to_extreme,
98 take_two_sides_extreme_sorted, update_word_vector,
99 )
102 DIRECTION_METHODS = ['single', 'sum', 'pca']
103 DEBIAS_METHODS = ['neutralize', 'hard', 'soft']
File ~/anaconda3/envs/seldo_responsibly/lib/python3.10/site-packages/responsibly/we/utils.py:14
9 from sklearn.manifold import TSNE
10 from sklearn.metrics import accuracy_score
13 WORD_EMBEDDING_MODEL_TYPES = (gensim.models.keyedvectors.KeyedVectors,
---> 14 gensim.models.keyedvectors.BaseKeyedVectors,
15 gensim.models.fasttext.FastText,
16 gensim.models.word2vec.Word2Vec,
17 gensim.models.base_any2vec.BaseWordEmbeddingsModel,) # pylint: disable=line-too-long
20 def round_to_extreme(value, digits=2):
21 place = 10**digits
AttributeError: module 'gensim.models.keyedvectors' has no attribute 'BaseKeyedVectors' |
I forked the repo and made some edits to the gensim functions in the |
Hi @tunde99, amazing work, thank you so much for doing that! I'll have a deeper look into your edits and merge it in the next few days. |
I am trying to use responsibly in google collaboratory, and each time I install it, when I go to use it, I get the following error: AttributeError: module 'gensim.models.keyedvectors' has no attribute 'BaseKeyedVectors'
During the install, this is what I get:
The text was updated successfully, but these errors were encountered: