From 5ca96dbed7540c550321debbba4b224fa953f6e0 Mon Sep 17 00:00:00 2001 From: guyueh1 Date: Wed, 8 Jan 2025 19:08:45 +0000 Subject: [PATCH] Apply isort and black reformatting Signed-off-by: guyueh1 --- nemo/collections/llm/recipes/nemotron4_15b.py | 4 +--- nemo/collections/llm/recipes/nemotron4_340b.py | 2 +- nemo/lightning/run/plugins.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/nemo/collections/llm/recipes/nemotron4_15b.py b/nemo/collections/llm/recipes/nemotron4_15b.py index e4765de7fb96..90baeec836f5 100644 --- a/nemo/collections/llm/recipes/nemotron4_15b.py +++ b/nemo/collections/llm/recipes/nemotron4_15b.py @@ -25,9 +25,7 @@ from nemo.collections.llm.recipes.log.default import default_log, default_resume, tensorboard_logger from nemo.collections.llm.recipes.nemotron import nemotron_model, nemotron_trainer from nemo.collections.llm.recipes.optim.adam import distributed_fused_adam_with_cosine_annealing -from nemo.collections.llm.recipes.tp_overlap_configs.userbuffers import ( - userbuffers_bf16_h100_h8192_tp2_mbs1_seqlen8192 -) +from nemo.collections.llm.recipes.tp_overlap_configs.userbuffers import userbuffers_bf16_h100_h8192_tp2_mbs1_seqlen8192 from nemo.lightning.pytorch.callbacks.megatron_comm_overlap import MegatronCommOverlapCallback from nemo.utils.exp_manager import TimingCallback diff --git a/nemo/collections/llm/recipes/nemotron4_340b.py b/nemo/collections/llm/recipes/nemotron4_340b.py index e397c7ed75bd..3813caf221f7 100644 --- a/nemo/collections/llm/recipes/nemotron4_340b.py +++ b/nemo/collections/llm/recipes/nemotron4_340b.py @@ -26,7 +26,7 @@ from nemo.collections.llm.recipes.nemotron import nemotron_model, nemotron_trainer from nemo.collections.llm.recipes.optim.adam import distributed_fused_adam_with_cosine_annealing from nemo.collections.llm.recipes.tp_overlap_configs.userbuffers import ( - userbuffers_bf16_h100_h18432_tp8_mbs1_seqlen4096 + userbuffers_bf16_h100_h18432_tp8_mbs1_seqlen4096, ) from nemo.lightning.pytorch.callbacks.megatron_comm_overlap import MegatronCommOverlapCallback from nemo.utils.exp_manager import TimingCallback diff --git a/nemo/lightning/run/plugins.py b/nemo/lightning/run/plugins.py index 5d33248384a8..f163b8f37ab2 100644 --- a/nemo/lightning/run/plugins.py +++ b/nemo/lightning/run/plugins.py @@ -19,6 +19,7 @@ from typing import Callable, Optional import nemo_run as run +import torch import yaml from lightning.pytorch import Callback from lightning.pytorch.loggers import WandbLogger @@ -27,11 +28,8 @@ from nemo.lightning.pytorch.callbacks import NsysCallback, PreemptionCallback from nemo.lightning.pytorch.strategies.megatron_strategy import MegatronStrategy from nemo.utils import logging - from nemo.utils.import_utils import safe_import -import torch - res_module, HAVE_RES = safe_import('nvidia_resiliency_ext.ptl_resiliency') # This file contains plugins based on NeMo-Run's run.Plugin API.