Closed vhvictorhugo closed 7 months ago
I'm leaving a print of the solution that i mentioned at the issue.
OBS: the line 145 contains the alteration mentioned.
Hi @vhvictorhugo, Thanks for letting us know about it. We'll look at it to find a permanent solution, but your solution will give you the correct results. There should be a set there in all cases.
Hello, @piotrgramacki! Thanks for your attention! For now i'll continue this way. I'm awaiting for new updates.
This problem is a result of a change in the h3
library: https://github.com/uber/h3-py/releases/tag/v4.0.0b3
We'll update our library and release a new version soon.
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 h3
library with h3==4.0.0b2
in the requirements file.
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.