graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

Unknown workflow: entity_extraction when running graphrag\examples\entity_extraction\with_graph_intelligence\run.py

Open thomasjlittle opened this issue 1 year ago • 6 comments

Hi, sorry if I have overlooked a simple solution to this, but I am running into the following error when trying to run the example scripts for entity extraction with graph intelligence.

Example file: entity_extraction when running graphrag\examples\entity_extraction\with_graph_intelligence\run.py

Exception has occurred: UnknownWorkflowError Unknown workflow: entity_extraction File "C:\Users\user\dev\MSGraphRag\graphrag\examples\entity_extraction\with_graph_intelligence\run.py", line 95, in run_python async for table in run_pipeline(dataset=dataset, workflows=workflows): File "C:\Users\user\dev\MSGraphRag\graphrag\examples\entity_extraction\with_graph_intelligence\run.py", line 107, in asyncio.run(run_python()) graphrag.index.errors.UnknownWorkflowError: Unknown workflow: entity_extraction

it looks like the 'entity_extraction' workflow is not in the default_workflows.py file or in the workflows.v1 folder either

thomasjlittle avatar Jul 03 '24 21:07 thomasjlittle

I guess they changed the names. I got it working like this:

workflows: list[PipelineWorkflowReference] = [
    PipelineWorkflowReference(
        name="create_base_extracted_entities",
        config={
            "entity_extract": {
                "strategy": {
                    "type": "nltk",
                }
            }
        },
    ),
    PipelineWorkflowReference(
        name="create_base_entity_graph",
        config={
            "cluster_graph": {"strategy": {"type": "leiden"}},
            "embed_graph": {
                "strategy": {
                    "type": "node2vec",
                    "num_walks": 10,
                    "walk_length": 40,
                    "window_size": 2,
                    "iterations": 3,
                    "random_seed": 597832,
                }
            },
            "layout_graph": {
                "strategy": {
                    "type": "umap",
                },
            },
        },
    ),
]

martinpenchev avatar Jul 04 '24 15:07 martinpenchev

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Aug 02 '24 01:08 github-actions[bot]

It also doesn't work for me. Even with martinpenchev's code snippet.

TudorAndrei avatar Aug 07 '24 15:08 TudorAndrei

me too! image

vinayybhore avatar Aug 13 '24 22:08 vinayybhore

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Aug 21 '24 01:08 github-actions[bot]

I guess they changed the names. I got it working like this:

workflows: list[PipelineWorkflowReference] = [
    PipelineWorkflowReference(
        name="create_base_extracted_entities",
        config={
            "entity_extract": {
                "strategy": {
                    "type": "nltk",
                }
            }
        },
    ),
    PipelineWorkflowReference(
        name="create_base_entity_graph",
        config={
            "cluster_graph": {"strategy": {"type": "leiden"}},
            "embed_graph": {
                "strategy": {
                    "type": "node2vec",
                    "num_walks": 10,
                    "walk_length": 40,
                    "window_size": 2,
                    "iterations": 3,
                    "random_seed": 597832,
                }
            },
            "layout_graph": {
                "strategy": {
                    "type": "umap",
                },
            },
        },
    ),
]

If you have a suitable CSV file could you provide a copy? Because I don't find the input csv file for that program in the code. Thank you very much. @martinpenchev

xinzheng99 avatar Aug 22 '24 03:08 xinzheng99

This issue has been marked stale due to inactivity after repo maintainer or community member responses that request more information or suggest a solution. It will be closed after five additional days.

github-actions[bot] avatar Aug 30 '24 01:08 github-actions[bot]

This issue has been closed after being marked as stale for five days. Please reopen if needed.

github-actions[bot] avatar Sep 04 '24 01:09 github-actions[bot]