[ci] pin ruff version and fix lint errors (#10681)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-24 16:29:58 +08:00
committed by GitHub
parent 3f77101580
commit 2ebe7be611
10 changed files with 30 additions and 21 deletions

View File

@@ -278,7 +278,9 @@ class HyperParallelTrainer(CustomSeq2SeqTrainer):
)
logical_batches = len(batch_sampler) // self._cp_size
dp_size = max(1, get_platform().get_world_size() // self._cp_size)
logical_length = logical_batches // dp_size if self.args.dataloader_drop_last else _ceil_div(logical_batches, dp_size)
logical_length = (
logical_batches // dp_size if self.args.dataloader_drop_last else _ceil_div(logical_batches, dp_size)
)
dataloader_params = {
"batch_sampler": batch_sampler,