From 1e069c3b1fa26b18b806f0aa3805b0f479ce8964 Mon Sep 17 00:00:00 2001 From: BoxiangW Date: Tue, 7 Jan 2025 22:53:02 +0000 Subject: [PATCH] Apply isort and black reformatting Signed-off-by: BoxiangW --- tests/collections/llm/hf/sft_fsdp2.py | 5 ++--- tests/collections/llm/hf/sft_nemorun_fsdp2.py | 6 ++---- tests/collections/llm/hf/utils.py | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/collections/llm/hf/sft_fsdp2.py b/tests/collections/llm/hf/sft_fsdp2.py index caa3282f4b08..300b4a08c596 100755 --- a/tests/collections/llm/hf/sft_fsdp2.py +++ b/tests/collections/llm/hf/sft_fsdp2.py @@ -15,13 +15,12 @@ import fiddle as fdl import torch from lightning.pytorch.loggers import WandbLogger +from packaging.version import Version as PkgVersion +from utils import get_torch_version_str from nemo import lightning as nl from nemo.collections import llm from nemo.lightning.pytorch.accelerate.transformer_engine import is_te_accelerated -from utils import get_torch_version_str - -from packaging.version import Version as PkgVersion DATA_PATH = '/home/TestData/lite/hf_cache/squad/' diff --git a/tests/collections/llm/hf/sft_nemorun_fsdp2.py b/tests/collections/llm/hf/sft_nemorun_fsdp2.py index b2fa456ff3ec..53dd863cb185 100644 --- a/tests/collections/llm/hf/sft_nemorun_fsdp2.py +++ b/tests/collections/llm/hf/sft_nemorun_fsdp2.py @@ -13,16 +13,14 @@ # limitations under the License. import nemo_run as run +from packaging.version import Version as PkgVersion +from utils import get_torch_version_str import nemo.lightning as nl from nemo.collections import llm from nemo.collections.common.tokenizers.huggingface.auto_tokenizer import AutoTokenizer from nemo.collections.llm.gpt.data.hf_dataset import SquadHFDataModule -from utils import get_torch_version_str - -from packaging.version import Version as PkgVersion - DATA_PATH = '/lustre/fsw/coreai_dlalgo_llm/boxiangw/squad' diff --git a/tests/collections/llm/hf/utils.py b/tests/collections/llm/hf/utils.py index f45046bc4680..dc2715ba32d3 100644 --- a/tests/collections/llm/hf/utils.py +++ b/tests/collections/llm/hf/utils.py @@ -8,4 +8,4 @@ def get_torch_version_str(): if hasattr(torch, '__version__'): return str(torch.__version__) else: - return version("torch") \ No newline at end of file + return version("torch")