camel icon indicating copy to clipboard operation
camel copied to clipboard

feat:medcalculator toolkit

Open ZackZikaiXiao opened this issue 11 months ago • 2 comments

PR Description: Modify and Update Medicine Toolkit (verifier)

Related Issues:

Resolves #2178.

Changes Made:

  • Rewrote medcalc_bench tools:

    • Included all tool functions from medcalc_bench with enhanced implementation.
    • Added standardized docstrings to clearly describe the functionality, parameters, and return values of each tool.
    • Provided test cases and practical examples for validating each tool’s correctness and usability.
    • Fixed existing bugs and errors identified within the original implementation.
    • Improved the directory structure of medcalc_bench, distinctly organizing tool modules and foundational utility modules.
  • Created medcalc_toolkit.py:

    • Developed a centralized interface for invoking all rewritten tools.
    • Ensured each function includes clear, standardized docstrings.
  • Added a Toolkit Example (tool_example.py):

    • Included detailed usage examples demonstrating how to effectively utilize the medcalc_toolkit.

Testing Details:

  • Conducted testing using one data sample per tool, totaling 44 tools tested.
  • Noted 4-5 tools lacking official test data from medcalc_bench; thus, these tools have not been verified.
  • Identified discrepancies between gold labels and inference results for approximately 3 tools, requiring further review.

Motivation:

This update directly addresses the feature request raised in #2178, aiming to improve maintainability, usability, and reliability within the Loong project's medical calculation components.

How to Test:

  1. Verify availability and documentation quality of tools within medcalc_toolkit.py.
  2. Run provided test cases to ensure functionality and accuracy.
  3. Review tool_example.py to validate practical usage scenarios.
  4. Pay special attention to tools identified with test data issues or discrepancies noted above.

Additional Notes:

  • PR addresses multiple issues highlighted during initial assessments, particularly related to accuracy and organizational clarity.
  • Careful review of untested tools or those showing result mismatches is advised during code review.

ZackZikaiXiao avatar Mar 24 '25 03:03 ZackZikaiXiao

Thanks @ZackZikaiXiao @13204942 for contributing this pull request! Please also make sure we follow their license during the development: https://github.com/ncbi-nlp/MedCalc-Bench/blob/main/CODE-LICENSE.

lightaime avatar Mar 25 '25 01:03 lightaime

thanks @ZackZikaiXiao @13204942 ,please fix the pre-commit error

zjrwtx avatar Apr 01 '25 04:04 zjrwtx