File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 10
10
from vlmeval .utils .result_transfer import MMMU_result_transfer , MMTBench_result_transfer
11
11
12
12
13
- def build_model_from_config (cfg ):
13
+ def build_model_from_config (cfg , model_name ):
14
14
import vlmeval .api
15
15
import vlmeval .vlm
16
- config = cp .deepcopy (cfg )
16
+ config = cp .deepcopy (cfg [model_name ])
17
+ if config == {}:
18
+ return supported_VLM [model_name ]()
17
19
assert 'class' in config
18
20
cls_name = config .pop ('class' )
19
21
if hasattr (vlmeval .api , cls_name ):
@@ -179,7 +181,7 @@ def main():
179
181
os .makedirs (pred_root , exist_ok = True )
180
182
181
183
if use_config :
182
- model = build_model_from_config (cfg ['model' ][ model_name ] )
184
+ model = build_model_from_config (cfg ['model' ], model_name )
183
185
184
186
for _ , dataset_name in enumerate (args .data ):
185
187
try :
You can’t perform that action at this time.
0 commit comments