Skip to content

Commit

Permalink
added print statements in create_map()
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Sep 11, 2023
1 parent 7b046d6 commit 1f67a10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ai_ta_backend/nomic_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def create_nomic_map(course_name: str, log_data: list):
"id": i, "user_email": log_user_email, "first_query": log_messages[0]['content']}
metadata.append(metadata_row)

print(len(metadata))
print("length of metadata: ", len(metadata))
metadata = pd.DataFrame(metadata)

embeddings_model = OpenAIEmbeddings() # type: ignore
Expand All @@ -211,6 +211,7 @@ def create_nomic_map(course_name: str, log_data: list):
# create Atlas project
project_name = NOMIC_MAP_NAME_PREFIX + course_name
index_name = course_name + "_convo_index"
print("project_name: ", project_name)
project = atlas.map_embeddings(embeddings=np.array(embeddings), data=metadata, # type: ignore -- this is actually the correc type, the function signature from Nomic is incomplete
id_field='id', build_topic_model=True, topic_label_field='first_query',
name=project_name, colorable_fields=['conversation_id', 'first_query'])
Expand Down

0 comments on commit 1f67a10

Please sign in to comment.