Skip to content

Commit

Permalink
code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
irenedea committed Mar 31, 2024
1 parent 8b403ec commit 9193461
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions llmfoundry/callbacks/hf_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,9 @@ def _save_checkpoint(self, state: State, logger: Logger):
self.huggingface_folder_name_fstr), state.run_name,
state.timestamp)

# Use a temporary directory if save_dir is remote.
# Use a temporary directory if save_dir is remote.
use_temp_dir = self.remote_ud is not None
temp_save_dir = tempfile.mkdtemp(
) if use_temp_dir else save_dir
temp_save_dir = tempfile.mkdtemp() if use_temp_dir else save_dir

log.debug('Gathering state dict')
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
Expand Down

0 comments on commit 9193461

Please sign in to comment.