Skip to content

Conversation

@AnilSorathiya
Copy link
Contributor

Pull Request Description

Warning appears due to missing annotation in agent_dataset.py

validmind/datasets/llm/agent_dataset.py No type or annotation for parameter '**kwargs'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter 'golden'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter 'test_case'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter 'llm_app_function'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter '**kwargs'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter 'deepeval_dataset'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter '**kwargs'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter '**kwargs'
WARNING validmind/datasets/llm/agent_dataset.py No type or annotation for parameter '**kwargs'

What and why?

Due to missing annotation in the functional arguments.

How to test

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@AnilSorathiya AnilSorathiya added the internal Not to be externalized in the release notes label Oct 15, 2025
@AnilSorathiya AnilSorathiya marked this pull request as ready for review October 15, 2025 14:44
Copy link
Contributor

@juanmleng juanmleng left a comment

Choose a reason for hiding this comment

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

lgtm. Just left a minor comment.

@github-actions
Copy link
Contributor

PR Summary

This pull request enhances and cleans up the codebase by performing several refactoring tasks and improvements to type annotations and documentation. The key changes include:

  1. In the LLMAgentDataset class:

    • Improved type annotations, explicitly importing and using types like Callable, Any, and Optional[str].
    • Enhanced docstrings for methods such as _convert_to_dataframe, _serialize_list_field, _serialize_tools_field, _deserialize_list_field, and various class methods with clearer Args and Returns sections.
    • Minor adjustments in method signatures to ensure proper typing, such as replacing ambiguous list types with List[Any] and moving the **kwargs typing to Any.
  2. In various scoring functions under the classification package (e.g., AbsoluteError, BrierScore, CalibrationError, ClassBalance, Confidence, Correctness, LogLoss, OutlierScore, ProbabilityError, Uncertainty):

    • Removed the unused **kwargs parameters to simplify the function signatures as they were only provided for backwards compatibility and not used.
  3. Minor modifications in the logging function in the result module by cleaning up parameter documentation.

Overall, the changes focus on improving code clarity, consistency in type hints and documentation, and reducing unnecessary parameters, which will aid in maintenance and future development.

Test Suggestions

  • Write unit tests for LLMAgentDataset to verify that data conversion, serialization, and deserialization functions work as intended.
  • Create tests to validate that adding test cases and goldens correctly updates the underlying pandas DataFrame.
  • Test the conversion methods (from_test_cases, from_goldens, from_deepeval_dataset) to ensure they correctly instantiate the dataset.
  • Run regression tests for all classification scoring functions to ensure their logic remains unchanged after the removal of **kwargs.
  • Include integration tests to verify that the dataset evaluation with DeepEval metrics produces expected results.

@AnilSorathiya AnilSorathiya merged commit 75d5d43 into main Oct 17, 2025
17 checks passed
@AnilSorathiya AnilSorathiya deleted the anilsorathiya/sc-12739/resolve-the-warning-from-agent-dataset-py branch October 17, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants