Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 6a5fb19

Browse files
committed
Move distributed into torchchat folder
1 parent a5f34e8 commit 6a5fb19

19 files changed

+28
-31
lines changed

dist_run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
import torch
1818
import torch.distributed as dist
1919

20-
from distributed.logging_utils import SingletonLogger
20+
from torchchat.distributed.logging_utils import SingletonLogger
2121

2222
# TODO - these are not distributed specific, consider moving to new package
23-
from distributed.safetensor_utils import (
23+
from torchchat.distributed.safetensor_utils import (
2424
get_hf_config_file,
2525
get_hf_weight_map_and_path,
2626
load_safetensor_weights,
2727
)
28-
from distributed.utils import (
28+
from torchchat.distributed.utils import (
2929
bytes_to_readable,
3030
Color as color,
3131
CUDATrackTime,

distributed/__init__.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

torchchat/cli/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
except ImportError:
2222
pass
2323

24-
from distributed import launch_distributed, ParallelDims, parallelize_llama
24+
from torchchat.distributed import launch_distributed, ParallelDims, parallelize_llama
2525

2626
from torch.distributed.device_mesh import DeviceMesh
2727

File renamed without changes.

torchchat/distributed/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
from torchchat.distributed.checkpoint import load_checkpoints_to_model
8+
from torchchat.distributed.logging_utils import SingletonLogger
9+
from torchchat.distributed.parallel_config import ParallelDims
10+
from torchchat.distributed.parallelize_llama import parallelize_llama
11+
from torchchat.distributed.utils import init_distributed
12+
from torchchat.distributed.world_maker import launch_distributed
File renamed without changes.

distributed/config_manager.py renamed to torchchat/distributed/config_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import torch
1414

15-
from distributed.logging_utils import SingletonLogger
15+
from torchchat.distributed.logging_utils import SingletonLogger
1616
logger = SingletonLogger.get_logger()
1717

1818

distributed/dtensor_utils.py renamed to torchchat/distributed/dtensor_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from collections import defaultdict
66

7-
from distributed.logging_utils import SingletonLogger
7+
from torchchat.distributed.logging_utils import SingletonLogger
88
logger = SingletonLogger.get_logger()
99

1010

File renamed without changes.

0 commit comments

Comments
 (0)