Merge branch 'karpathy:master' into master

This commit is contained in:
Rimom Costa 2025-10-14 09:51:45 +01:00 committed by GitHub
commit af8f6435df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,8 +104,8 @@ def find_largest_model(checkpoint_dir):
candidates.sort(key=lambda x: x[0], reverse=True)
return candidates[0][1]
# 2) if that failed, take the most recently updated model:
candidates.sort(key=lambda x: os.path.getmtime(os.path.join(checkpoint_dir, x[1])), reverse=True)
return candidates[0][1]
model_tags.sort(key=lambda x: os.path.getmtime(os.path.join(checkpoint_dir, x)), reverse=True)
return model_tags[0]
def find_last_step(checkpoint_dir):