Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Shallow copy issue #231

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lmms_eval/api/task.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import abc
import ast
import copy
import inspect
import itertools
import json
Expand Down Expand Up @@ -1245,7 +1246,7 @@ def construct_requests(self, doc_id: int, ctx: str, **kwargs) -> Union[List[Inst
return request_list

elif self.OUTPUT_TYPE == "generate_until":
arguments = (ctx, self.config.generation_kwargs, self.doc_to_visual, doc_id, self.config.task, split)
arguments = (ctx, copy.deepcopy(self.config.generation_kwargs), self.doc_to_visual, doc_id, self.config.task, split)
return Instance(request_type=self.OUTPUT_TYPE, arguments=arguments, idx=0, **kwargs)

# TODO: we add a full_docs interface here for some evaluations that needs to access the full datasets during process_results function. we may have better ways to handle this.
Expand Down
2 changes: 1 addition & 1 deletion lmms_eval/tasks/mmmu/utils_group_img.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def add_order_label(image, label, font_size=40):

# Define font for the label
# font_path = fm.findfont(fm.FontProperties(family=font_family))
font_path = "./arial.ttf"
font_path = os.path.join(__file__, os.pardir, "arial.ttf")
font = ImageFont.truetype(font_path, font_size)

# Calculate text size and position
Expand Down
Loading