Skip to content

Commit

Permalink
add docstring for helepr
Browse files Browse the repository at this point in the history
  • Loading branch information
irenedea committed Oct 23, 2024
1 parent 8dcc1c4 commit 145388b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llmfoundry/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 145388b

Please sign in to comment.