From d9f9a4c3719c9b6b55be42f3f7dcda2398d41ad0 Mon Sep 17 00:00:00 2001 From: yaoyu-33 Date: Tue, 26 Nov 2024 18:32:02 +0000 Subject: [PATCH] Apply isort and black reformatting Signed-off-by: yaoyu-33 --- nemo/collections/vlm/recipes/llava15_13b.py | 7 +++---- nemo/collections/vlm/recipes/llava15_7b.py | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/nemo/collections/vlm/recipes/llava15_13b.py b/nemo/collections/vlm/recipes/llava15_13b.py index 00eaad692656..d85ba6f2752b 100644 --- a/nemo/collections/vlm/recipes/llava15_13b.py +++ b/nemo/collections/vlm/recipes/llava15_13b.py @@ -18,6 +18,7 @@ import nemo_run as run import pytorch_lightning as pl import torch +from megatron.core.distributed import DistributedDataParallelConfig from nemo import lightning as nl from nemo.collections import llm, vlm @@ -26,10 +27,8 @@ from nemo.collections.llm.recipes.optim.adam import distributed_fused_adam_with_cosine_annealing from nemo.collections.llm.recipes.precision.mixed_precision import bf16_mixed from nemo.collections.vlm.neva.data.mock import MockDataModule -from nemo.utils.exp_manager import TimingCallback from nemo.lightning.pytorch.callbacks.megatron_comm_overlap import MegatronCommOverlapCallback - -from megatron.core.distributed import DistributedDataParallelConfig +from nemo.utils.exp_manager import TimingCallback NAME = "llava15_13b" @@ -105,7 +104,7 @@ def finetune_recipe( overlap_grad_reduce=True, overlap_param_gather=True, average_in_collective=True, - ) + ), ) trainer = run.Config( diff --git a/nemo/collections/vlm/recipes/llava15_7b.py b/nemo/collections/vlm/recipes/llava15_7b.py index e3439b97854c..2abb50db6c11 100644 --- a/nemo/collections/vlm/recipes/llava15_7b.py +++ b/nemo/collections/vlm/recipes/llava15_7b.py @@ -18,6 +18,7 @@ import nemo_run as run import pytorch_lightning as pl import torch +from megatron.core.distributed import DistributedDataParallelConfig from nemo import lightning as nl from nemo.collections import llm, vlm @@ -26,10 +27,8 @@ from nemo.collections.llm.recipes.optim.adam import distributed_fused_adam_with_cosine_annealing from nemo.collections.llm.recipes.precision.mixed_precision import bf16_mixed from nemo.collections.vlm.neva.data.mock import MockDataModule -from nemo.utils.exp_manager import TimingCallback from nemo.lightning.pytorch.callbacks.megatron_comm_overlap import MegatronCommOverlapCallback - -from megatron.core.distributed import DistributedDataParallelConfig +from nemo.utils.exp_manager import TimingCallback NAME = "llava15_7b" @@ -105,7 +104,7 @@ def finetune_recipe( overlap_grad_reduce=True, overlap_param_gather=True, average_in_collective=True, - ) + ), ) trainer = run.Config(