Skip to content

Commit

Permalink
deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
pufanyi committed Sep 6, 2024
1 parent 3827381 commit afd3338
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lmms_eval/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import random
import re
import shutil
import copy
import subprocess
from collections.abc import Callable
from dataclasses import asdict, dataclass, field
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

0 comments on commit afd3338

Please sign in to comment.