Skip to content

Commit

Permalink
update format
Browse files Browse the repository at this point in the history
  • Loading branch information
rlsu9 committed Jan 3, 2025
1 parent af3c5c3 commit 756bf29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_save_checkpoint.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import os
import shutil
import pytest

import pytest
import torch.distributed as dist
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP

from fastvideo.utils.checkpoint import save_checkpoint
from fastvideo.models.mochi_hf.modeling_mochi import MochiTransformer3DModel
from fastvideo.utils.checkpoint import save_checkpoint
from fastvideo.utils.fsdp_util import get_dit_fsdp_kwargs


@pytest.fixture(scope="module", autouse=True)
def setup_distributed():
os.environ["RANK"] = "0"
Expand All @@ -21,6 +22,7 @@ def setup_distributed():
yield
dist.destroy_process_group()


def test_save_and_remove_checkpoint():
transformer = MochiTransformer3DModel(num_layers=0)
fsdp_kwargs, _ = get_dit_fsdp_kwargs(transformer, "none")
Expand Down

0 comments on commit 756bf29

Please sign in to comment.