Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thomasjlittle opened this issue Jul 3, 2024 · 1 comment

Comments

@thomasjlittle
Copy link

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

@martinpenchev
Copy link

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",
                },
            },
        },
    ),
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants