Skip to content

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

Merged
chakravarthik27 merged 3 commits intorelease/2.6.0from
update/supports-the-qa-task-in-jsl-models
Feb 18, 2025
Merged

feat: add support for question answering model in JSL model handler#1174
chakravarthik27 merged 3 commits intorelease/2.6.0from
update/supports-the-qa-task-in-jsl-models

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
Contributor

@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
@chakravarthik27 chakravarthik27 deleted the update/supports-the-qa-task-in-jsl-models branch March 12, 2025 06:06
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