Skip to content

Commit

Permalink
Update nemo_skills/inference/server/reward_model.py
Browse files Browse the repository at this point in the history
Co-authored-by: Shubham Toshniwal <[email protected]>
  • Loading branch information
wedu-nvidia and shtoshni authored Nov 27, 2024
1 parent a1e7027 commit d152db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo_skills/inference/server/reward_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def process_single_prompt(prompt):
score = 1 / (1 + math.exp(-raw_score))
return {"reward_model_score": score}

with ThreadPoolExecutor(len(prompts)) as executor:
with ThreadPoolExecutor(max_workers=len(prompts)) as executor:
for idx, prompt in enumerate(prompts):
futures[executor.submit(process_single_prompt, prompt)] = idx

Expand Down

0 comments on commit d152db3

Please sign in to comment.