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()