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

Retry multiple times when M1 selects an invalid agent. Make agent sel… #5079

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

afourney
Copy link
Member

Retry multiple times when M1 selects an invalid agent. Make agent selection deterministic when the team is a singleton (corner case).

Mitigates: #5069

…ection deterministic when the team is a singleton (corner case).
@husseinmozannar
Copy link
Contributor

Does this make the validation code and the error raise redundant when we actually select the next speaker?

@afourney
Copy link
Member Author

Does this make the validation code and the error raise redundant when we actually select the next speaker?

The one at the end? Yes. Basically, we need to loop through to find the right agent anyways, because we need the refence to the instance. With this new code, we should now never reach the end of that loop without finding the agent. If you do, then something very wrong has occurred. It might make a better assertion than classic error -- but I'm inclined to keep it, since it would abruptly end orchestration otherwise.

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.37%. Comparing base (b02965e) to head (2eb5a31).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...p_chat/_magentic_one/_magentic_one_orchestrator.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5079      +/-   ##
==========================================
- Coverage   72.94%   69.37%   -3.58%     
==========================================
  Files         115      163      +48     
  Lines        6780    10499    +3719     
==========================================
+ Hits         4946     7284    +2338     
- Misses       1834     3215    +1381     
Flag Coverage Δ
unittests 69.37% <40.00%> (-3.58%) ⬇️

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.

@afourney afourney enabled auto-merge (squash) January 16, 2025 20:28
@afourney afourney merged commit 2e1a9c7 into main Jan 16, 2025
62 checks passed
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