Skip to content

Conversation

@keith-decker
Copy link
Contributor

Added examples and ensured metrics have error.type when error is present

@keith-decker keith-decker requested review from a team as code owners November 4, 2025 17:47

if isinstance(obj, EmbeddingInvocation):
invocation = obj
invocation = cast(Any, obj)
Copy link
Contributor

@zhirafovod zhirafovod Nov 4, 2025

Choose a reason for hiding this comment

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

Asking to learn - why to case obj -> Any if it is an instance of EmbeddingInvocation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mypy gets mad because invocation has been typed on line 67 as a LLMInvocation.

We know only one of these if statements would be entered, but mypy doesn't.

I suppose we could fix this to be a switch, or if elses. Or, use a different variable for each type as it comes through

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the variables to be unique. it just makes the PR noisy.

@keith-decker keith-decker merged commit 3471c6a into main Nov 5, 2025
1 of 14 checks passed
@keith-decker keith-decker deleted the HYBIM-395-ensure-metric-error-attrs branch November 5, 2025 18:45
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants