Fix typo in qwen_vl that was causing "reference before assignment" · EvolvingLMMs-Lab/lmms-eval@8557367 (original) (raw)

Original file line number Diff line number Diff line change
@@ -230,7 +230,7 @@ def _collate(x):
230 230 raise ValueError(f"Expected `gen_kwargs['until']` to be of type Union[str,list] but got {type(until)}")
231 231 for i in range(len(contexts)):
232 232 if "" in contexts[i]:
233 -context[i] = contexts[i].replace("", "")
233 +contexts[i] = contexts[i].replace("", "")
234 234 questions = [self.prompt.format(visual_path, context) for visual_path, context in zip(visual_paths, contexts)]
235 235
236 236 # Similar to llava, is visual paths has len 0