From 0d348d607053c27331863c206ed0d49380b35af4 Mon Sep 17 00:00:00 2001 From: Alonso Guevara Date: Fri, 27 Sep 2024 17:10:52 -0600 Subject: [PATCH] Remove unused cols from final entities (#1226) * Remove unused cols from final entities * Move verbs test to integ * Move verbs test to integ * Move to smoke tests --- .github/workflows/python-smoke-tests.yml | 4 ++++ .semversioner/next-release/patch-20240927171840021536.json | 4 ++++ graphrag/index/workflows/v1/subflows/create_final_entities.py | 1 + 3 files changed, 9 insertions(+) create mode 100644 .semversioner/next-release/patch-20240927171840021536.json diff --git a/.github/workflows/python-smoke-tests.yml b/.github/workflows/python-smoke-tests.yml index 0002b6dba2..c7902ee3fa 100644 --- a/.github/workflows/python-smoke-tests.yml +++ b/.github/workflows/python-smoke-tests.yml @@ -92,6 +92,10 @@ jobs: run: | poetry build + - name: Verb Test + run: | + poetry run poe test_verbs + - name: Install Azurite id: azuright uses: potatoqualitee/azuright@v1.1 diff --git a/.semversioner/next-release/patch-20240927171840021536.json b/.semversioner/next-release/patch-20240927171840021536.json new file mode 100644 index 0000000000..8cab839a63 --- /dev/null +++ b/.semversioner/next-release/patch-20240927171840021536.json @@ -0,0 +1,4 @@ +{ + "type": "patch", + "description": "Remove unused column from final entities" +} diff --git a/graphrag/index/workflows/v1/subflows/create_final_entities.py b/graphrag/index/workflows/v1/subflows/create_final_entities.py index ee4333a078..1a285d366b 100644 --- a/graphrag/index/workflows/v1/subflows/create_final_entities.py +++ b/graphrag/index/workflows/v1/subflows/create_final_entities.py @@ -91,6 +91,7 @@ async def create_final_entities( # Drop rows with NaN 'description_embedding' if not using vector store if not description_text_embed.get("strategy", {}).get("vector_store"): nodes = nodes.loc[nodes["description_embedding"].notna()] + nodes.drop(columns="name_description", inplace=True) # Return final result return create_verb_result(cast(Table, nodes))