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

Implement docker based command line code executor #1856

Merged
merged 18 commits into from
Mar 7, 2024

Conversation

jackgerrits
Copy link
Member

@jackgerrits jackgerrits commented Mar 4, 2024

Why are these changes needed?

This PR implements Docker based command line code execution in the new code executor framework.

This docker executor also solves the issue where many images are created and polluting the user's Docker installation. It works by running commands in a running container, rather than the old way where it would run each command in a new layer and commit it.

Related issue number

Checks

@jackgerrits jackgerrits requested a review from ekzhu March 4, 2024 21:48
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 85.93750% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 47.65%. Comparing base (62e77ad) to head (92311e7).
Report is 2 commits behind head on main.

Files Patch % Lines
autogen/coding/docker_commandline_code_executor.py 88.42% 7 Missing and 7 partials ⚠️
autogen/coding/jupyter/docker_jupyter_server.py 0.00% 2 Missing ⚠️
autogen/coding/jupyter/jupyter_code_executor.py 0.00% 1 Missing ⚠️
autogen/coding/jupyter/local_jupyter_server.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1856       +/-   ##
===========================================
+ Coverage   36.10%   47.65%   +11.54%     
===========================================
  Files          63       64        +1     
  Lines        6658     6784      +126     
  Branches     1470     1618      +148     
===========================================
+ Hits         2404     3233      +829     
+ Misses       4056     3288      -768     
- Partials      198      263       +65     
Flag Coverage Δ
unittests 47.56% <85.15%> (+11.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jackgerrits jackgerrits marked this pull request as ready for review March 6, 2024 16:47
Copy link
Collaborator

@ekzhu ekzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some docs on constructor is needed. Some note for the next PR.

@jackgerrits
Copy link
Member Author

@ekzhu, should be ready to go

@ekzhu ekzhu added this pull request to the merge queue Mar 7, 2024
Merged via the queue into microsoft:main with commit e9219fe Mar 7, 2024
46 of 57 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* implement docker based command line code executor

* undo import

* test skips

* format

* fix type issue

* skip docker tests

* fix paths

* add docs

* Update __init__.py

* class name

* precommit

* undo twoagent change

* use relative to directly

* Update, fixes, etc.

* update doc

* Update docstring

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants