langtest.tasks.task.VisualQA#
- class VisualQA#
Bases:
BaseTask
- __init__()#
Methods
__init__
()column_mapping
(item_keys, columns_names, ...)Return the column mapping.
create_sample
(row_data[, image, question, ...])Create a sample.
load_model
(model_path, model_hub[, model_type])Load the model.
Attributes
Return the sample class.
task_registry
- column_mapping(item_keys, columns_names, *args, **kwargs)#
Return the column mapping.
- create_sample(row_data: dict, image: str = 'image_1', question: str = 'question', options: str = 'options', answer: str = 'answer', dataset_name: str = '') VisualQASample #
Create a sample.
- property get_sample_cls#
Return the sample class.
- classmethod load_model(model_path: str, model_hub: str, model_type: Literal['chat', 'completion'] | None = None, *args, **kwargs)#
Load the model.
- sample_class#
alias of
VisualQASample