Skip to content

Feat/exp backend comparison#3

Draft
catebros wants to merge 3 commits intomainfrom
feat/exp-backend-comparison
Draft

Feat/exp backend comparison#3
catebros wants to merge 3 commits intomainfrom
feat/exp-backend-comparison

Conversation

@catebros
Copy link
Copy Markdown
Collaborator

  • Depends on Flowgentic Hotfix/benchmarking-redesign PR (For Academy and Autogen implementation and event model)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new BackendComparison experiment to benchmark agent orchestration frameworks, including LangGraph, AutoGen, and Academy, against backend engines like AsyncFlow and Parsl. The update adds new workload implementations, a comprehensive plotting utility, and refined dependency management. Review feedback identifies several issues: a potential crash in the Discord notification function due to missing environment variable validation, unreachable code in the notification utility, a logic error in invocation count reporting that could lead to misleading metrics, and the inclusion of an unused schema file.

Comment on lines +43 to +45
webhook_url = os.getenv("DISCORD_WEBHOOK")
data = {"content": msg}
requests.post(webhook_url, json=data)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The send_discord_notifaction function does not handle the case where the DISCORD_WEBHOOK environment variable is not set. If os.getenv("DISCORD_WEBHOOK") returns None, requests.post(None, ...) will raise an exception, crashing the program. Please add a check for the webhook URL.

This function also duplicates logic from data_generation/utils/io_utils.py. Consider refactoring to use a single notification utility.

	webhook_url = os.getenv("DISCORD_WEBHOOK")
	if webhook_url:
		data = {"content": msg}
		try:
			requests.post(webhook_url, json=data, timeout=5).raise_for_status()
		except requests.exceptions.RequestException as e:
			logger.error(f"Failed to send Discord notification: {e}")

self.webhook_url = os.getenv("DISCORD_WEBHOOK")

def send_discord_notification(self, msg: str, image_path: str = None):
return None
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This return None statement makes the rest of the function unreachable code. This appears to be a temporary change for debugging. Please ensure this is removed before merging to allow Discord notifications to work as intended.

for engine_id, record in data.items():
d = _extract_event_durations(record["events"])

n_inv = len(d["d_resolve"]) or 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using or 1 here can lead to incorrect reporting. If there are zero invocations, n_inv will be set to 1, which is misleading when this metric is displayed in the results table. It's better to correctly report 0 and handle potential division-by-zero errors where the division actually occurs, if any.

Suggested change
n_inv = len(d["d_resolve"]) or 1
n_inv = len(d["d_resolve"])

@@ -0,0 +1 @@
from pydantic import BaseModel No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This file appears to be unused. The main.py for this experiment imports schemas from data_generation/utils/schemas. If this file is not needed, it should be removed to avoid confusion. Also, it's missing a newline at the end of the file, which is a style violation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dbd89144-bb50-4d86-b827-1d3c76e42bfc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/exp-backend-comparison

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant