Skip to content

Commit 5fd527d

Browse files
committed
lint
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
1 parent f7b3021 commit 5fd527d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

nemo_rl/models/megatron/data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ def process_global_batch(
342342
}
343343

344344

345-
346345
def _pack_sequences_for_megatron(
347346
input_ids: torch.Tensor,
348347
seq_lengths: torch.Tensor,

nemo_rl/models/megatron/pipeline_parallel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
def broadcast_obj_from_pp_rank(obj: Any) -> Any:
2929
"""Broadcast an object across pipeline parallel ranks.
30+
3031
This utility function handles broadcasting an object from the rank that owns it
3132
to all other pipeline parallel ranks. If only one rank has the object (non-None),
3233
it will be broadcast to all other ranks.

tests/unit/algorithms/test_sequence_packing_gradients.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def __init__(self, cp_size):
4242

4343
def test_sequence_packing_gradients(self):
4444
from nemo_rl.distributed.model_utils import _get_tokens_on_this_cp_rank
45-
from nemo_rl.models.megatron.train import (
46-
forward_with_post_processing_fn,
47-
LossPostProcessor,
48-
)
4945
from nemo_rl.models.megatron.data import (
5046
_pack_sequences_for_megatron,
5147
make_processed_microbatch_iterator,
5248
)
49+
from nemo_rl.models.megatron.train import (
50+
LossPostProcessor,
51+
forward_with_post_processing_fn,
52+
)
5353

5454
# Initialize process group
5555
torch.distributed.init_process_group(backend="nccl")

0 commit comments

Comments
 (0)