mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
[Feature]: Add mm suport for local (#169)
This commit is contained in:
parent
5b80d83866
commit
2f1949e7a1
@ -9,7 +9,7 @@ val_pipeline = [
|
||||
std=(0.26862954, 0.26130258, 0.27577711)),
|
||||
dict(type='mmpretrain.PackInputs',
|
||||
algorithm_keys=[
|
||||
'question', 'answer', 'category', 'l2-category', 'context',
|
||||
'question', 'category', 'l2-category', 'context',
|
||||
'index', 'options_dict', 'options', 'split'
|
||||
])
|
||||
]
|
||||
|
@ -9,7 +9,7 @@ val_pipeline = [
|
||||
std=(0.26862954, 0.26130258, 0.27577711)),
|
||||
dict(type='mmpretrain.PackInputs',
|
||||
algorithm_keys=[
|
||||
'question', 'answer', 'category', 'l2-category', 'context',
|
||||
'question', 'category', 'l2-category', 'context',
|
||||
'index', 'options_dict', 'options', 'split'
|
||||
])
|
||||
]
|
||||
|
@ -64,6 +64,20 @@ class MultimodalInferTask:
|
||||
evaluator_name = self.evaluator[0]['type']
|
||||
return f'{model_name}-{dataset_name}-{evaluator_name}'
|
||||
|
||||
def get_log_path(self, file_extension: str = 'json') -> str:
|
||||
"""Get the path to the log file.
|
||||
|
||||
Args:
|
||||
file_extension (str): The file extension of the log file.
|
||||
Default: 'json'.
|
||||
"""
|
||||
model_name = self.model['type']
|
||||
dataset_name = self.dataloader['dataset']['type']
|
||||
evaluator_name = self.evaluator[0]['type']
|
||||
|
||||
return osp.join(model_name,
|
||||
f'{dataset_name}-{evaluator_name}.{file_extension}')
|
||||
|
||||
def get_command(self, cfg_path, template):
|
||||
"""Get the command template for the task.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user