Skip to content

Commit 6caba97

Browse files
committed
lint
1 parent 91cd5b2 commit 6caba97

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

megatron/core/inference/engines/dynamic_engine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,9 +1318,9 @@ def schedule_requests(self) -> int:
13181318
header = Headers(data[0])
13191319

13201320
if self.received_stop:
1321-
assert header == Headers.STOP_ACK, (
1322-
"Engine is shutting down. No other messages allowed except STOP_ACK."
1323-
)
1321+
assert (
1322+
header == Headers.STOP_ACK
1323+
), "Engine is shutting down. No other messages allowed except STOP_ACK."
13241324

13251325
if header == Headers.SUBMIT_REQUEST:
13261326
request_id, prompt, sampling_params = data[1:]

megatron/core/inference/headers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Headers(Enum):
2020
STOP = auto()
2121
STOP_ACK = auto()
2222

23+
2324
class UnknownHeaderError(Exception):
2425
"""A signal with an unrecognized header was received by the coordinator."""
2526

megatron/core/inference/inference_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ async def _recv_task(self):
139139
)
140140
completion_future = self.completion_futures.pop(request_id)
141141
if completion_future.done():
142-
logging.warning(
143-
f"Client: The future for {request_id} has been cancelled!"
144-
)
142+
logging.warning(f"Client: The future for {request_id} has been cancelled!")
145143
continue
146144
completion_future.set_result(DynamicInferenceRequestRecord.deserialize(reply))
147145
elif header == Headers.PAUSE_ACK:

0 commit comments

Comments
 (0)