nomic-ai/nomic

KeyError in AtlasProjection.group_by_topic(3)

michael4tasman opened this issue · 2 comments

Source:

project = atlas.AtlasProject(project_id=PROJECT)
map = project.get_map()
topic_groups = map.group_by_topic(3)

Error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[24], line 3
      1 project = atlas.AtlasProject(project_id=PROJECT)
      2 map = project.get_map()
----> 3 topic_groups = map.group_by_topic(3)

File ~/Minds/projects/topical/nomic/lib/python3.10/site-packages/nomic/project.py:745, in AtlasProjection.group_by_topic(self, topic_depth)
    742 result_dict = {}
    743 topic_metadata = topic_df[topic_df["topic_short_description"] == topic]
--> 745 subtopics = hierarchy[topic]
    746 result_dict["subtopics"] = subtopics
    747 result_dict["subtopic_ids"] = topic_df[topic_df["topic_short_description"].isin(subtopics)]["topic_id"].tolist()

KeyError: 'Cloud and Server Hosting'

Hey @michael4tasman! Thank you for your patience. We have a fix out for the group_by_topic bug you were encountering that should go out in next release.

Just confirming that this appears to be fixed in 2.0.5. Many thanks!