Aegis graph docs#6417
Merged
Merged
Conversation
…_group_chat/_graph/_graph_builder.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
…#6402) ## Why are these changes needed? *Problem* Previously, in `DockerCommandLineCodeExecutor`, cancellation tasks were added directly to `self._cancellation_tasks` using `asyncio.create_task()`: ```python self._cancellation_tasks.append(asyncio.create_task(self._kill_running_command(command))) ``` This caused issues when cancellation tasks were created from multiple event loops, leading to loop mismatch errors during executor shutdown. *Solution* This PR fixes the issue by introducing a dedicated internal event loop for managing cancellation tasks. Cancellation tasks are now scheduled in a fixed event loop using `asyncio.run_coroutine_threadsafe()`: ```python future: ConcurrentFuture[None] = asyncio.run_coroutine_threadsafe( self._kill_running_command(command), self._loop ) self._cancellation_futures.append(future) ``` *Additional Changes* - Added detailed logging for easier debugging. - Ensured clean shutdown of the internal event loop and associated thread. *Note* This change ensures that all cancellation tasks are handled consistently in a single loop, preventing cross-loop conflicts and improving executor stability in multi-threaded environments. ## Related issue number <!-- For example: "Closes microsoft#1234" --> Closes microsoft#6395 ## Checks - [ ] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
…agent (microsoft#6407) ## Why are these changes needed? Starting from AutoGen v0.5.5, tools are internally managed through `StaticWorkbench`. However, both tools and workbench were being serialized and deserialized, which caused conflicts during deserialization: • When both are restored, the constructor raises: ``` ValueError: Tools cannot be used with a workbench. ``` The changes address this issue by: 1. Removing tools from serialization/deserialization: • tools are now considered internal state of `StaticWorkbench`, and are no longer serialized. • Only workbench is serialized, ensuring consistency and avoiding duplication. 2. Ensuring logical integrity: • Since tools are not used directly after initialization, persisting them separately serves no functional purpose. • This avoids scenarios where both are populated, violating constructor constraints. Summary: This change prevents tools/workbench conflicts by fully delegating tool management to `StaticWorkbench` and avoiding unnecessary persistence of tools themselves. <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number Closes microsoft#6405 ## Checks - [ ] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. --------- Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
## Why are these changes needed? Anthropic models are supported by AWS bedrock. ChatCompletionClient can be created for anthropic bedrock models using this changes. This enables the user to do the following - Add any anthropic models and version from AWS bedrock - Can use ChatCompletionClient for bedrock anthropic models ## Related issue number Closes microsoft#5226 --------- Co-authored-by: harini.narasimhan <harini.narasimhan@eagleview.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
## Why are these changes needed? Add missing dependency to tracing docs <!-- Please give a short summary of the change and the problem this solves. --> ## Related issue number <!-- For example: "Closes microsoft#1234" --> Closes microsoft#6419 ## Checks - [ ] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [ ] I've made sure all auto checks have passed.
3 tasks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6417 +/- ##
=======================================
Coverage 78.54% 78.54%
=======================================
Files 225 225
Lines 16521 16521
=======================================
Hits 12976 12976
Misses 3545 3545
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Related issue number
Checks
Documentation for Graph based workflow. I kept this separate from pull request #6333 so that you can just merge in the code without the documentation changes if needed.