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

[Issue]: LocalCommandlineCodeExecutor doesn't include the stdout when timeout is hit #3534

Open
Ilaiwi opened this issue Sep 16, 2024 · 0 comments

Comments

@Ilaiwi
Copy link

Ilaiwi commented Sep 16, 2024

Describe the issue

when timeout is hit while using LocalCommandlineCodeExecutor. The stdout from all of our prints are never returned to the llm.

Steps to reproduce

run this code

from pathlib import Path

from autogen.coding import CodeBlock, LocalCommandLineCodeExecutor

work_dir = Path("coding")
work_dir.mkdir(exist_ok=True)

executor = LocalCommandLineCodeExecutor(work_dir=work_dir, timeout=5)
print(
    executor.execute_code_blocks(
        code_blocks=[
            CodeBlock(language="python", code="""print('Hello, World!')
import time
time.sleep(10)"""),
        ]
    )
)

Notice that the output only has Timeout but not "Hello, World!"

Screenshots and logs

No response

Additional Information

Not sure if this is done intentionally or not. If it's not then I would be happy to submit a fix.

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

1 participant