Skip to content

Commit a9bc74e

Browse files
committed
fix pre-commit
Signed-off-by: 0oshowero0 <o0shower0o@outlook.com>
1 parent 11f8eeb commit a9bc74e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_controller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ def test_controller_with_multi_partitions(self, ray_setup):
330330
data_fields=data_fields,
331331
)
332332
)
333-
expected_global_index_2 = torch.tensor(range(part1_index_range, part2_index_range + part1_index_range), dtype=torch.long)
333+
expected_global_index_2 = torch.tensor(
334+
range(part1_index_range, part2_index_range + part1_index_range), dtype=torch.long
335+
)
334336
assert torch.equal(global_index_2, expected_global_index_2)
335337
expected_production_status_2 = torch.ones(part2_index_range, len(data_fields), dtype=torch.int8)
336338
assert torch.equal(production_status_2, expected_production_status_2)

transfer_queue/controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def mark_consumed(self, task_name: str, global_indices: list[int]):
466466

467467
# ==================== Consumption Status Interface ====================
468468

469-
def get_consumption_status(self, task_name: str, mask:bool=False) -> tuple[Tensor, Tensor]:
469+
def get_consumption_status(self, task_name: str, mask: bool = False) -> tuple[Tensor, Tensor]:
470470
"""
471471
Get or create consumption status for a specific task.
472472
Handles dynamic expansion when new samples are added.
@@ -498,7 +498,7 @@ def get_consumption_status(self, task_name: str, mask:bool=False) -> tuple[Tenso
498498
return partition_global_index, consumption_status
499499

500500
# ==================== Production Status Interface ====================
501-
def get_production_status_for_fields(self, field_names: list[str], mask:bool=False) -> tuple[Tensor, Tensor]:
501+
def get_production_status_for_fields(self, field_names: list[str], mask: bool = False) -> tuple[Tensor, Tensor]:
502502
"""
503503
Check if all samples for specified fields are fully produced and ready.
504504

0 commit comments

Comments
 (0)