Skip to content

Commit

Permalink
Fix gen inferencer (open-compass#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leymore authored and BunnyRunnerX committed Nov 22, 2023
1 parent 6be1fd0 commit e678c3d
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 @@ -134,8 +134,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 e678c3d

Please sign in to comment.