forked from EvolvingLMMs-Lab/lmms-eval
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Joshua/vizwizvqa refactor (EvolvingLMMs-Lab#42)
* refactor vizwizvqa task * Merge commit '59c7d67077c315657a02bdee2eace0e64c1ee0d4' * Fix exact_match accuracy calculation in vizwiz_vqa_process_results * Update vizwiz_vqa tasks --------- Co-authored-by: Fanyi Pu <[email protected]>
- Loading branch information
Showing
15 changed files
with
174 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dataset_path: lmms-lab/VizWiz-VQA | ||
output_type: generate_until | ||
doc_to_visual: !function utils.vizwiz_vqa_doc_to_visual | ||
doc_to_text: !function utils.vizwiz_vqa_doc_to_text | ||
doc_to_target: "answer" | ||
generation_kwargs: | ||
until: | ||
- "ASSISTANT:" | ||
metadata: | ||
- version: 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
import yaml | ||
|
||
splits = ["val", "test"] | ||
tasks = ["vqa"] | ||
|
||
if __name__ == "__main__": | ||
dump_tasks = [] | ||
for task in tasks: | ||
for split in splits: | ||
yaml_dict = {"group": f"vizwiz_{task}", "task": f"vizwiz_{task}_{split}", "include": f"_default_template_{task}_yaml", "test_split": split} | ||
if split == "train": | ||
yaml_dict.pop("group") | ||
else: | ||
dump_tasks.append(f"vizwiz_{task}_{split}") | ||
|
||
save_path = f"./vizwiz_{task}_{split}.yaml" | ||
print(f"Saving to {save_path}") | ||
with open(save_path, "w") as f: | ||
yaml.dump(yaml_dict, f, default_flow_style=False, sort_keys=False) | ||
|
||
group_dict = {"group": "vizwiz_vqa", "task": dump_tasks} | ||
|
||
with open("./_vizwiz_vqa.yaml", "w") as f: | ||
yaml.dump(group_dict, f, default_flow_style=False, indent=4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
group: vizwiz_vqa | ||
task: | ||
- vizwiz_vqa_val | ||
- vizwiz_vqa_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
group: vizwiz_vqa | ||
task: vizwiz_vqa_test | ||
test_split: test | ||
include: _default_template_vqa_yaml | ||
process_results: !function utils.vizwiz_vqa_process_results_test | ||
metric_list: | ||
# - metric: exact_match | ||
# aggregation: mean | ||
# higher_is_better: true | ||
# ignore_case: true | ||
# ignore_punctuation: true | ||
- metric: submission | ||
aggregation: !function utils.vizwiz_vqa_aggreate_submissions | ||
higher_is_better: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
group: vizwiz_vqa | ||
task: vizwiz_vqa_val | ||
test_split: val | ||
include: _default_template_vqa_yaml | ||
process_results: !function utils.vizwiz_vqa_process_results_val | ||
metric_list: | ||
- metric: exact_match | ||
aggregation: mean | ||
higher_is_better: true | ||
ignore_case: true | ||
ignore_punctuation: true | ||
# - metric: submission | ||
# aggregation: !function utils.vizwiz_vqa_aggreate_submissions | ||
# higher_is_better: true |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.