Skip to content

Commit

Permalink
Update unified_checkpoint.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DesmonDay authored Dec 20, 2024
1 parent 3c0059e commit bfc88b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions paddlenlp/trainer/unified_checkpoint/unified_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ def load_unified_optimizer(self, model, optimizer, resume_from_checkpoint):
)
if has_merge_optimizer_safetensors:
optimizer_index_file = os.path.join(resume_from_checkpoint, SAFE_OPTIMIZER_INDEX_NAME)
if distributed_isfile(optimizer_index_file):
distributed_file(optimizer_index_file)
distributed_file(optimizer_index_file)
with open(optimizer_index_file, "r") as f:

Check warning on line 440 in paddlenlp/trainer/unified_checkpoint/unified_checkpoint.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/trainer/unified_checkpoint/unified_checkpoint.py#L438-L440

Added lines #L438 - L440 were not covered by tests
index = json.loads(f.read())

Expand Down

0 comments on commit bfc88b6

Please sign in to comment.