Skip to content

feat: add TraceProvider support as alternative to task in evaluations#9

Open
afarntrog wants to merge 3 commits intomainfrom
devx_3_30
Open

feat: add TraceProvider support as alternative to task in evaluations#9
afarntrog wants to merge 3 commits intomainfrom
devx_3_30

Conversation

@afarntrog
Copy link
Copy Markdown
Owner

Introduce a provider parameter to run_evaluations and run_evaluations_async that accepts a TraceProvider to fetch evaluation data by session_id instead of requiring a task callable. Add _resolve_task static method to validate mutual exclusivity between task and provider and generate the appropriate callable.

Description

Related Issues

Documentation PR

Type of Change

Bug fix
New feature
Breaking change
Documentation update
Other (please describe):

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Introduce a `provider` parameter to `run_evaluations` and
`run_evaluations_async` that accepts a `TraceProvider` to fetch
evaluation data by session_id instead of requiring a task callable.
Add `_resolve_task` static method to validate mutual exclusivity
between `task` and `provider` and generate the appropriate callable.
Remove the TraceProvider integration from run_evaluations and
run_evaluations_async, making the task parameter required instead
of optional. This removes the _resolve_task static method and the
provider parameter, simplifying the evaluation API by requiring
callers to always pass a task callable directly.
Narrow the return type from bare `Callable` to `Callable[[Case], TaskOutput]`
and update the docstring to match. This improves type safety and editor
support for consumers of `as_task`.
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