crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[BUG] Pipelines with Routes - unable to start, documentation is broken

Open eugenepyvovarov opened this issue 1 year ago • 2 comments

Description

Trying to get pipelines going with routes, documentation and samples are slightly off. Imports to Routes and Route are not correct and sample code will fail validation for Tasks, Agent pedantic validation, since it is missing several fields.

But even after fixing that it will not start, I receive this error message no matter what

RuntimeWarning: coroutine 'Pipeline.kickoff' was never awaited main_pipeline.kickoff(inputs=inputs) RuntimeWarning: Enable tracemalloc to get the object allocation traceback

As I understand - the route functionality is done with async module and we can't just run it like normal function. But my experience with async calling is not enough to run it properly, if someone was able to run it - please advice.

Steps to Reproduce

  1. just followed the route documentation https://docs.crewai.com/core-concepts/Pipeline/#routers-in-pipelines

Expected behavior

I expect it to run and return something so I can start building on top of it

Screenshots/Code snippets

everything is in the description

Operating System

macOS Sonoma

Python Version

3.12

crewAI Version

0.51

crewAI Tools Version

--

Virtual Environment

Venv

Evidence

CleanShot 2024-09-05 at 14 42 25

Possible Solution

I can try to help docs where I did myself, however I. need help with async part

Additional context

.

eugenepyvovarov avatar Sep 05 '24 12:09 eugenepyvovarov

Hey @eugenepyvovarov! I'm working on updating the Pipeline docs this week.

I want to unblock you as fast as possible though! Are you free for a Zoom call today or tomorrow? I'd be happy to review your pipeline and show you how to fix it.

Please shoot me an email at [email protected] so we can coordinate a time if you're interested in additional support.

If not, no worries! I'll shoot you a message as soon as we fix the docs.

bhancockio avatar Sep 09 '24 15:09 bhancockio

Description

Trying to get pipelines going with routes, documentation and samples are slightly off. Imports to Routes and Route are not correct and sample code will fail validation for Tasks, Agent pedantic validation, since it is missing several fields.

But even after fixing that it will not start, I receive this error message no matter what

RuntimeWarning: coroutine 'Pipeline.kickoff' was never awaited main_pipeline.kickoff(inputs=inputs) RuntimeWarning: Enable tracemalloc to get the object allocation traceback

As I understand - the route functionality is done with async module and we can't just run it like normal function. But my experience with async calling is not enough to run it properly, if someone was able to run it - please advice.

Steps to Reproduce

  1. just followed the route documentation https://docs.crewai.com/core-concepts/Pipeline/#routers-in-pipelines

Expected behavior

I expect it to run and return something so I can start building on top of it

Screenshots/Code snippets

everything is in the description

Operating System

macOS Sonoma

Python Version

3.12

crewAI Version

0.51

crewAI Tools Version

--

Virtual Environment

Venv

Evidence

CleanShot 2024-09-05 at 14 42 25

Possible Solution

I can try to help docs where I did myself, however I. need help with async part

Additional context

.

try to start the pipeline kickoff like this function call, I try this is OK! gen_pipeline = Pipeline( stages=[spam_crew, analyst_crew, writing_crew] )

async def gen_main(): result_s = await gen_pipeline.kickoff(inputs=[{"discussion": discussion}]) return result_s

results = asyncio.run(gen_main())

Yazooliu avatar Sep 24 '24 09:09 Yazooliu

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 24 '24 12:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 29 '24 12:10 github-actions[bot]