Skip to content

Agent Spec Evaluation Computer improvements - #240

Open
soufianeamini wants to merge 3 commits into
mainfrom
evaluation-improvements
Open

Agent Spec Evaluation Computer improvements#240
soufianeamini wants to merge 3 commits into
mainfrom
evaluation-improvements

Conversation

@soufianeamini

Copy link
Copy Markdown
Member
  • Use CapacityLimiter over Semaphore
  • Limit the amount of concurrent tasks that are running at once (the number of tasks spawned would be at most max_concurrency + 1)
  • Producer/worker pattern is not needed anymore as a result

@soufianeamini
soufianeamini requested review from a team and cesarebernardis August 27, 2026 09:07
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 27, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@cesarebernardis The test_unlimited_concurrency test fails if the tasks finish too soon (if I add a bigger delay it succeeds) because it is not required anymore that all tasks start before starting processing. So from testing instead of seeing tasks go up to 200 running tasks concurrently, it ends up hovering around the 60 concurrent tasks range.

Is there a different kind of test you'd want to be implemented or should I just delete it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, I think you can get rid of it.

I am a bit more concerned by the removal of test_run_does_not_spawn_one_task_per_item, I think it's a good thing to check. What's the reason why it was removed?

Maybe it does not apply anymore exactly as-is, as we are not using start_soon, but I would like to keep a semantically similar test if possible. Do we have a concurrency limit test already?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The reason for its removal is that the new version does actually spawn one task per item. It just doesn't do it in an unbounded fashion but rather respects the max_concurrency limit.

Yes we do have a test called test_max_concurrency_is_respected, if I (wrongly) increment the max_concurrency inside the CapacityLimiter constructor the test easily fails.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, I think you can get rid of it.

I am a bit more concerned by the removal of test_run_does_not_spawn_one_task_per_item, I think it's a good thing to check. What's the reason why it was removed?

Maybe it does not apply anymore exactly as-is, as we are not using start_soon, but I would like to keep a semantically similar test if possible. Do we have a concurrency limit test already?

@soufianeamini
soufianeamini force-pushed the evaluation-improvements branch from 209cbea to 2d5899a Compare September 13, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants