From 145388b1c8f6673e6711b3bbfd0d4b1da7db6785 Mon Sep 17 00:00:00 2001 From: Irene Dea Date: Wed, 23 Oct 2024 04:34:13 +0000 Subject: [PATCH] add docstring for helepr --- llmfoundry/utils/file_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llmfoundry/utils/file_utils.py b/llmfoundry/utils/file_utils.py index 2543aea759..f50f5b42c4 100644 --- a/llmfoundry/utils/file_utils.py +++ b/llmfoundry/utils/file_utils.py @@ -7,6 +7,11 @@ def dist_mkdtemp() -> str: + """Creates a temp directory on local rank 0 to use for other ranks. + + Returns: + str: The path to the temporary directory. + """ tempdir = None if dist.get_local_rank() == 0: tempdir = tempfile.mkdtemp()