Skip to content
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

feat: add support for question answering model in JSL model handler #1174

Merged

Conversation

chakravarthik27
Copy link
Collaborator

This pull request introduces several enhancements and new features to the langtest/modelhandler/jsl_modelhandler.py file. The changes include adding support for a new model type, updating method signatures, and improving the handling of input data.

New Model Support:

  • Added MedicalQuestionAnswering to the list of supported models and created a new PretrainedModelForQA class to handle question-answering tasks. This includes methods for initializing the model, checking if a model instance is supported, and performing predictions. [1] [2] [3]

Method Signature Updates:

  • Updated the __call__ method in PretrainedJSLModel to accept additional arguments (*args and **kwargs) and handle dictionary inputs by converting them to HashableDict.

Utility Imports:

  • Imported HashableDict from langtest.utils.custom_types.helpers to facilitate the handling of dictionary inputs in the __call__ method.

These changes enhance the flexibility and functionality of the model handler, particularly for question-answering tasks.

Copy link
Collaborator

@ArshaanNazir ArshaanNazir left a comment

Choose a reason for hiding this comment

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

LGTM

@chakravarthik27 chakravarthik27 merged commit e354f91 into release/2.6.0 Feb 18, 2025
3 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