Skip to content

Commit

Permalink
Merge branch 'main' into chcui/fix_mcore_conversion_bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cuichenx authored Nov 2, 2023
2 parents d8c7192 + 05ecfe4 commit c6b4e54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nemo/utils/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,10 @@ def ckpt_to_dir(filepath: Union[str, Path]) -> Path:

filepath = Path(filepath)

# if it is already a distributed checkpoint, then return
if filepath.suffix != ".ckpt" and filepath.is_dir():
return filepath

# adding this assert because we will later remove directories based on the return value of this method
assert filepath.suffix == ".ckpt", f'filepath: {filepath} must have .ckpt extension'

Expand Down

0 comments on commit c6b4e54

Please sign in to comment.