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

Update Evals SDK #175

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Update Evals SDK #175

merged 5 commits into from
Dec 19, 2024

Conversation

EricGustin
Copy link
Contributor

@EricGustin EricGustin commented Dec 18, 2024

PR Description

This PR renames ExpectedToolCall to NamedExpectedToolCall and then creates a new dataclass called ExpectedToolCall. ExpectedToolCall can be passed to the EvalSuite.add_case and EvalSuite.extend_case methods.

  1. Enhance EvalSuite.add_case and EvalSuite.extend_case by accepting a list of ExpectedToolCall as their expected_tool_calls input parameter. This helps create a scaffolding for developers. Previously, the expected type was list[tuple[Callable, dict[str, Any]]], which is still valid for backward compatibility.
# Before (still valid for backward compatibility)
expected_tool_calls=[
    (
        adjust_playback_position,
        {
            "absolute_position_ms": 10000,
        },
    )
]
        

# After
expected_tool_calls=[
    ExpectedToolCall(
        func=adjust_playback_position,
        args={"absolute_position_ms": 10000},
    )
]
  1. Removed any references to arcade.core in toolkits directory.
  2. Some linting for import organization.



@dataclass
class NamedExpectedToolCall:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy of what ExpectedToolCall used to be.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@EricGustin EricGustin marked this pull request as ready for review December 18, 2024 18:51
Copy link
Collaborator

@nbarbettini nbarbettini left a comment

Choose a reason for hiding this comment

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

Thanks for adding tests!

@@ -2,13 +2,15 @@
from arcade_code_sandbox.tools.e2b import create_static_matplotlib_chart, run_code
from arcade_code_sandbox.tools.models import E2BSupportedLanguage

from arcade.core.catalog import ToolCatalog
from arcade.sdk import ToolCatalog
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks 💯

@EricGustin EricGustin merged commit 7c228a5 into main Dec 19, 2024
9 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.

2 participants