Skip to content

Conversation

@olzhik11
Copy link
Member

@olzhik11 olzhik11 commented May 26, 2025

Important

Add metadata support to evaluation datapoints, updating resource handling and data models to include metadata fields.

  • Behavior:
    • Add metadata field to PartialEvaluationDatapoint and EvaluationResultDatapoint in types.py.
    • Update save_datapoints() in asynchronous/resources/evals.py and synchronous/resources/evals.py to handle metadata in datapoints.
    • Modify _evaluate_datapoint() in evaluations.py to include metadata when creating PartialEvaluationDatapoint and EvaluationResultDatapoint.
  • Models:
    • Update PartialEvaluationDatapoint and EvaluationResultDatapoint in types.py to include metadata field.
  • Misc:
    • Update to_dict() methods in PartialEvaluationDatapoint and EvaluationResultDatapoint to serialize metadata.

This description was created by Ellipsis for e310b72. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds metadata support to the evaluation system, allowing arbitrary JSON-serializable metadata to be attached to evaluation datapoints and preserved throughout the pipeline.

  • Added metadata: Optional[Any] field to Datapoint, PartialEvaluationDatapoint, and EvaluationResultDatapoint classes in src/lmnr/sdk/types.py
  • Updated save_datapoints() in both sync/async clients to handle metadata serialization
  • Modified evaluation pipeline in src/lmnr/sdk/evaluations.py to preserve metadata from input to output
  • Added .idea to .gitignore for JetBrains IDE support

5 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to e310b72 in 1 minute and 11 seconds. Click for details.
  • Reviewed 128 lines of code in 4 files
  • Skipped 1 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/lmnr/sdk/client/asynchronous/resources/evals.py:42
  • Draft comment:
    Union type update for datapoints looks good; ensure docstring mentions the metadata support.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. src/lmnr/sdk/client/synchronous/resources/evals.py:44
  • Draft comment:
    Consistent union type update for datapoints; docstring now reflects metadata support.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. src/lmnr/sdk/evaluations.py:315
  • Draft comment:
    Passing datapoint.metadata into both partial and result datapoints; ensure input metadata is JSON-serializable.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. src/lmnr/sdk/types.py:69
  • Draft comment:
    New metadata field with serialization is added consistently; consider truncating metadata like other fields if it might be large.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_vZ5ry7pWUzHtZch5

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@dinmukhamedm dinmukhamedm merged commit abf5093 into main May 26, 2025
7 checks passed
@dinmukhamedm dinmukhamedm deleted the feat/LAM-631 branch May 26, 2025 19:12
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.

4 participants