Skip to content

Span-level evals additional features #34

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

Merged
merged 37 commits into from
Jan 21, 2025
Merged

Conversation

JCamyre
Copy link
Collaborator

@JCamyre JCamyre commented Jan 8, 2025

  1. Add a tag for each span, specifying which type of span it is: LLM call, tool call, regular span, etc.
  2. Automatically assign project names and unique eval run names to each span evaluation ran
  3. Fix depth count.

JCamyre added 30 commits January 7, 2025 19:32
…tions, tools, etc. Tweak condense() logic to properly support structure.
… the results after logged (important as it contains example_id).
@JCamyre JCamyre force-pushed the joseph/span-level-evals branch from c44abe8 to 684b8ce Compare January 19, 2025 19:48
Copy link
Collaborator Author

@JCamyre JCamyre left a comment

Choose a reason for hiding this comment

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

Run UT's

Copy link
Collaborator Author

@JCamyre JCamyre left a comment

Choose a reason for hiding this comment

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

Rerun UT's

Copy link
Collaborator Author

@JCamyre JCamyre left a comment

Choose a reason for hiding this comment

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

Rerun UT's.

Copy link
Collaborator Author

@JCamyre JCamyre left a comment

Choose a reason for hiding this comment

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

Rerun UT's.

{"type": "output", "function": "test_func", "depth": 1, "timestamp": 1.2, "output": "result"},
{"type": "exit", "function": "test_func", "depth": 0, "timestamp": 2.0},
{"type": "enter", "function": "test_func", "depth": base_depth, "timestamp": 1.0},
{"type": "input", "function": "test_func", "depth": base_depth + 1, "timestamp": 1.1, "inputs": {"x": 1}},
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch

mock_response.usage = MagicMock(prompt_tokens=10, completion_tokens=20, total_tokens=30)
client.chat.completions.create = MagicMock(return_value=mock_response)
mock_completion = MagicMock()
mock_completion.choices = [MagicMock(message=MagicMock(content="test response"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

grape

Copy link
Contributor

@SecroLoL SecroLoL left a comment

Choose a reason for hiding this comment

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

LGTM. Nice PR -- I like the span names change. Seems like updating the UTs must've been annoying, thanks for doing this

@SecroLoL SecroLoL merged commit 4587969 into main Jan 21, 2025
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