Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
opencompass
Commits
2f1949e7
Unverified
Commit
2f1949e7
authored
Aug 08, 2023
by
Yuan Liu
Committed by
GitHub
Aug 08, 2023
Browse files
[Feature]: Add mm suport for local (#169)
parent
5b80d838
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
configs/multimodal/instructblip/instructblip-mmbench.py
configs/multimodal/instructblip/instructblip-mmbench.py
+1
-1
configs/multimodal/minigpt_4/minigpt_4_7b_mmbench.py
configs/multimodal/minigpt_4/minigpt_4_7b_mmbench.py
+1
-1
opencompass/tasks/mm_infer.py
opencompass/tasks/mm_infer.py
+14
-0
No files found.
configs/multimodal/instructblip/instructblip-mmbench.py
View file @
2f1949e7
...
@@ -9,7 +9,7 @@ val_pipeline = [
...
@@ -9,7 +9,7 @@ val_pipeline = [
std
=
(
0.26862954
,
0.26130258
,
0.27577711
)),
std
=
(
0.26862954
,
0.26130258
,
0.27577711
)),
dict
(
type
=
'mmpretrain.PackInputs'
,
dict
(
type
=
'mmpretrain.PackInputs'
,
algorithm_keys
=
[
algorithm_keys
=
[
'question'
,
'answer'
,
'category'
,
'l2-category'
,
'context'
,
'question'
,
'category'
,
'l2-category'
,
'context'
,
'index'
,
'options_dict'
,
'options'
,
'split'
'index'
,
'options_dict'
,
'options'
,
'split'
])
])
]
]
...
...
configs/multimodal/minigpt_4/minigpt_4_7b_mmbench.py
View file @
2f1949e7
...
@@ -9,7 +9,7 @@ val_pipeline = [
...
@@ -9,7 +9,7 @@ val_pipeline = [
std
=
(
0.26862954
,
0.26130258
,
0.27577711
)),
std
=
(
0.26862954
,
0.26130258
,
0.27577711
)),
dict
(
type
=
'mmpretrain.PackInputs'
,
dict
(
type
=
'mmpretrain.PackInputs'
,
algorithm_keys
=
[
algorithm_keys
=
[
'question'
,
'answer'
,
'category'
,
'l2-category'
,
'context'
,
'question'
,
'category'
,
'l2-category'
,
'context'
,
'index'
,
'options_dict'
,
'options'
,
'split'
'index'
,
'options_dict'
,
'options'
,
'split'
])
])
]
]
...
...
opencompass/tasks/mm_infer.py
View file @
2f1949e7
...
@@ -64,6 +64,20 @@ class MultimodalInferTask:
...
@@ -64,6 +64,20 @@ class MultimodalInferTask:
evaluator_name
=
self
.
evaluator
[
0
][
'type'
]
evaluator_name
=
self
.
evaluator
[
0
][
'type'
]
return
f
'
{
model_name
}
-
{
dataset_name
}
-
{
evaluator_name
}
'
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
):
def
get_command
(
self
,
cfg_path
,
template
):
"""Get the command template for the task.
"""Get the command template for the task.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment