Skip to content

Commit

Permalink
[Fix] Fix gen inferencer (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leymore committed Nov 22, 2023
1 parent 721a45c commit fb30b7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opencompass/openicl/icl_inferencer/icl_gen_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def inference(self,
entry, max_out_len=self.max_out_len)
generated = results

num_return_sequences = self.model.get('generation_kwargs', {}).get(
'num_return_sequences', 1)
num_return_sequences = getattr(self.model, 'generation_kwargs',
{}).get('num_return_sequences', 1)
# 5-3. Save current output
for prompt, prediction, gold in zip(
parsed_entries, batched(generated, num_return_sequences),
Expand Down

0 comments on commit fb30b7c

Please sign in to comment.