-
Notifications
You must be signed in to change notification settings - Fork 20
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
'list' object has no attribute 'discard' #431
Comments
Hi @vhvictorhugo, |
Hello, @piotrgramacki! |
This problem is a result of a change in the For now, one solution to this problem is to apply the change proposed by @vhvictorhugo. Another one (if you don't want to install srai as an editable package) is to install the previous version of the |
Thanks for feedback @piotrgramacki |
I'm trying to execute the hex2vec_embedder.ipynb notebook, but the follow error appears when i execute all the notebook (without any changes):
OBS: the error appears in the cell that generate region embeddings, i. e., before viewing the embeddings' similarity.
File ~/.local/lib/python3.10/site-packages/srai/neighbourhoods/_base.py:161, in Neighbourhood._handle_center(self, index, distance, neighbours, at_distance, include_center_override)
159 neighbours.add(index)
160 else:
--> 161 neighbours.discard(index)
162 return neighbours
AttributeError: 'list' object has no attribute 'discard'
I've been looking to this function (_handle_center at srai/neighbourhoods/_base.py file) that the problems appear and setting the neighbours variable as python set, like
neighbours = set(neighbours)
at the beginning of the function and works fine, but i'm reporting this problem because i belive that have another optimized ways to resolve this problem.This colab notebook contains the complete error code.
The text was updated successfully, but these errors were encountered: