Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
NouamaneTazi committed Apr 24, 2024
1 parent e2f5211 commit 26a657b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""File to update the checkpoint from 1.3 to 1.4 to fix the problem where '{type.value}_{suffix_name}.safetensors' was duplicated.
"""Fixes the problem where '{type.value}_{suffix_name}.safetensors' was duplicated in checkpoint files
For example this script will change the following:
```
Expand All @@ -9,7 +9,7 @@
Example Usage:
python scripts/update_ckpt_to_1_4.py /fsx/nouamane/projects/nanotron/checkpoints/10
python scripts/fix_checkpoint_bad_naming.py /fsx/nouamane/projects/nanotron/checkpoints/10
"""

import argparse
Expand Down Expand Up @@ -37,8 +37,7 @@ def update_checkpoint(checkpoint_dir: str):
# so that we get "model_weight_pp-rank-0-of-1_tp-rank-0-of-2.safetensors"

print(f"Renaming {file} to {new_file}")
# os.rename(os.path.join(root, file), os.path.join(root, new_file))
raise ("done")
os.rename(os.path.join(root, file), os.path.join(root, new_file))


def main():
Expand Down

0 comments on commit 26a657b

Please sign in to comment.