-
Notifications
You must be signed in to change notification settings - Fork 144
Parallelize scenarios #2
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
Conversation
WalkthroughThe updates refactor the policy scenario evaluation process to run each scenario concurrently using asynchronous tasks and a shared queue for status updates, replacing the previous sequential approach. Additionally, the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ScenarioEvaluationService
participant asyncio.Queue
participant arun_evaluator_agent
Client->>ScenarioEvaluationService: _evaluate_policy_scenarios()
loop For each scenario
ScenarioEvaluationService->>ScenarioEvaluationService: _evaluate_single_policy_scenario(scenario, queue) (async task)
ScenarioEvaluationService->>asyncio.Queue: Put status update ("in_progress")
ScenarioEvaluationService->>arun_evaluator_agent: Evaluate scenario (async)
arun_evaluator_agent-->>ScenarioEvaluationService: Yield updates
ScenarioEvaluationService->>asyncio.Queue: Put update
ScenarioEvaluationService->>asyncio.Queue: Put result
alt Exception
ScenarioEvaluationService->>asyncio.Queue: Put error status update
end
end
ScenarioEvaluationService->>Client: Yield updates from queue_watcher
ScenarioEvaluationService->>ScenarioEvaluationService: Await all tasks (asyncio.gather)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🔇 Additional comments (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
* wip on vibing a new architecture * wip on vibing a new architecture * wip on vibing a new architecture * wip * wip * wip * wip * wip * --wip-- [skip ci] * fixed!!!!! * fixed!!!!! * --wip-- [skip ci] * fixed!!!!! * fixed!!!!! * wip * wip * wip * wip * Update rogue/server/api/health.py Co-authored-by: yuval-qf <[email protected]> * wip * wip * wip * wip * wip * remove the non functional UI * getting started with the go tui * --wip-- [skip ci] * --wip-- [skip ci] * --wip-- [skip ci] * getting started with the go tui * wip * wip on tui * wip on tui * ci * fix the tests * ci fix * ci fix * ci fix * ci fix * wip * fix the tests * tui in another pr * Update sdks/python/rogue_client/client.py Co-authored-by: yuval-qf <[email protected]> * wip * Update rogue/evaluator_agent/run_evaluator_agent.py Co-authored-by: drorIvry <[email protected]> * Update rogue/evaluator_agent/run_evaluator_agent.py Co-authored-by: drorIvry <[email protected]> * CR - part 1 * Consolidate types * interviewer cr * wip * wip * Remove legacy * Consolidate services * Consolidate services * fix business context hardcoded * wip * websocket manager singleton * endpoint prefixes * rename * fix license in pyproject * fix model/judge_llm confusion * Rename rogue_client -> rogue_sdk * install sdk and server in gh action * install on system * rename rogue_sdk directory * rename rogue_sdk directory #2 * Use venv * typo in __init__ * Consolidate __main__ files * fix init * fix main * Consolidate more types * Consolidate more types * Fix tests * replace judge_llm_model -> judge_llm * replace judge_llm_model -> judge_llm * Fix mypy * Fix mypy * Fix model validate * Remove unused aliases * Fix AgentConfig initialization * Fix tests cicd * Fix tests * rabbit ci * Typing * better backoff * Add task lock * mypy fixes * exception handling * rabbit cr * wip * wip * Remove refresh button * gh action --------- Co-authored-by: yuval-qf <[email protected]>
Summary by CodeRabbit
Refactor
Chores