Skip to content

Commit 4b32c01

Browse files
committed
Fix linting issues
Signed-off-by: Pranav Prashant Thombre <pthombre@nvidia.com>
1 parent 0d2bdd5 commit 4b32c01

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

nemo_deploy/llm/megatronllm_deployable_ray.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,7 @@ async def _batched_infer_impl(self, inference_inputs_list: List[Dict[str, Any]])
311311
for param in ["temperature", "top_k", "top_p", "max_length"]:
312312
vals = {inputs.get(param) for inputs in inference_inputs_list}
313313
if len(vals) > 1:
314-
LOGGER.warning(
315-
f"Batched requests have different '{param}': {vals}. Using first request's value."
316-
)
314+
LOGGER.warning(f"Batched requests have different '{param}': {vals}. Using first request's value.")
317315

318316
merged_inputs = {
319317
"prompts": all_prompts,
@@ -335,15 +333,15 @@ async def _batched_infer_impl(self, inference_inputs_list: List[Dict[str, Any]])
335333
individual_results = []
336334
offset = 0
337335
for count in prompt_counts:
338-
result = {"sentences": results.get("sentences", [])[offset:offset + count]}
336+
result = {"sentences": results.get("sentences", [])[offset : offset + count]}
339337

340338
log_probs = results.get("log_probs", None)
341339
if log_probs is not None:
342-
result["log_probs"] = log_probs[offset:offset + count]
340+
result["log_probs"] = log_probs[offset : offset + count]
343341

344342
top_logprobs = results.get("top_logprobs", None)
345343
if top_logprobs is not None:
346-
result["top_logprobs"] = top_logprobs[offset:offset + count]
344+
result["top_logprobs"] = top_logprobs[offset : offset + count]
347345

348346
individual_results.append(result)
349347
offset += count

0 commit comments

Comments
 (0)