Skip to content

Commit d97e594

Browse files
committed
fix
Signed-off-by: Hemil Desai <hemild@nvidia.com>
1 parent d2f9003 commit d97e594

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

nemo_run/core/execution/slurm.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,12 @@ def merge(
369369
main_executor.run_as_group = True
370370

371371
if main_executor.het_group_indices:
372-
assert (
373-
main_executor.heterogeneous
374-
), "heterogeneous must be True if het_group_indices is provided"
375-
assert (
376-
len(main_executor.het_group_indices) == num_tasks
377-
), "het_group_indices must be the same length as the number of tasks"
372+
assert main_executor.heterogeneous, (
373+
"heterogeneous must be True if het_group_indices is provided"
374+
)
375+
assert len(main_executor.het_group_indices) == num_tasks, (
376+
"het_group_indices must be the same length as the number of tasks"
377+
)
378378
assert all(
379379
x <= y
380380
for x, y in zip(
@@ -858,9 +858,9 @@ def materialize(self) -> str:
858858

859859
sbatch_flags = []
860860
if self.executor.heterogeneous:
861-
assert (
862-
len(self.jobs) == len(self.executor.resource_group)
863-
), f"Number of jobs {len(self.jobs)} must match number of resource group requests {len(self.executor.resource_group)}.\nIf you are just submitting a single job, make sure that heterogeneous=False in the executor."
861+
assert len(self.jobs) == len(self.executor.resource_group), (
862+
f"Number of jobs {len(self.jobs)} must match number of resource group requests {len(self.executor.resource_group)}.\nIf you are just submitting a single job, make sure that heterogeneous=False in the executor."
863+
)
864864
final_group_index = len(self.executor.resource_group) - 1
865865
if self.executor.het_group_indices:
866866
final_group_index = self.executor.het_group_indices.index(
@@ -870,9 +870,9 @@ def materialize(self) -> str:
870870
for i in range(len(self.executor.resource_group)):
871871
resource_req = self.executor.resource_group[i]
872872
if resource_req.het_group_index is not None:
873-
assert (
874-
self.executor.resource_group[i - 1].het_group_index is not None
875-
), "het_group_index must be set for all requests in resource_group"
873+
assert self.executor.resource_group[i - 1].het_group_index is not None, (
874+
"het_group_index must be set for all requests in resource_group"
875+
)
876876
if (
877877
i > 0
878878
and resource_req.het_group_index

0 commit comments

Comments
 (0)