Skip to content

Commit a9b8d8c

Browse files
committed
Fix pylint: remove unnecessary lambda wrapper
1 parent 13a0e34 commit a9b8d8c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/instructlab/training/main_ds.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ def _save_and_exit(checkpoint_location: str) -> None:
253253
# the check runs after every minibatch backward rather than
254254
# waiting for the full optimizer step.
255255
_interrupt_check = (
256-
(lambda: check_checkpoint_requested())
257-
if on_demand_checkpointing
258-
else None
256+
check_checkpoint_requested if on_demand_checkpointing else None
259257
)
260258
batch_metrics, avg_loss_across_ranks = batch_loss_manager.process_batch(
261259
batch, interrupt_check=_interrupt_check

0 commit comments

Comments
 (0)