Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nancyhung committed Oct 25, 2024
1 parent 04ddfaa commit 8e42217
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llmfoundry/callbacks/hf_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def _maybe_get_license_filename(
If the license file does not exist, returns None.
"""
# Early return if no local directory exists
if not os.path.exists(local_dir):
return None

# Try to find the license file
try:
license_filename = next(
file for file in os.listdir(local_dir)
Expand Down

0 comments on commit 8e42217

Please sign in to comment.