Skip to content

Commit de24b25

Browse files
committed
[LLM] Fix dependency graph paper cut: move CloudFileSystem to top-level import
Move CloudFileSystem import to module top level in cloud_downloader.py. It was inline inside on_before_download_model_files_distributed() with no justification for deferring the import. Signed-off-by: ps2181 <hellopritam31@gmail.com>
1 parent 5871fd6 commit de24b25

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

python/ray/llm/_internal/common/callbacks/cloud_downloader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pydantic import BaseModel, field_validator
66

77
from .base import CallbackBase
8+
from ray.llm._internal.common.utils.cloud_utils import CloudFileSystem
89

910
logger = logging.getLogger(__name__)
1011

@@ -74,8 +75,6 @@ def __init__(self, **kwargs: Any) -> None:
7475

7576
def on_before_download_model_files_distributed(self) -> None:
7677
"""Download files from cloud storage to local paths before model files are downloaded."""
77-
from ray.llm._internal.common.utils.cloud_utils import CloudFileSystem
78-
7978
paths = self.kwargs["paths"]
8079
start_time = time.monotonic()
8180
for cloud_uri, local_path in paths:

0 commit comments

Comments
 (0)