Skip to content

Commit

Permalink
fix compression symlink (mosaicml#3300)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 authored May 17, 2024
1 parent bddf44b commit 3128cee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer/utils/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def is_compressed_pt(filename: str) -> bool:
of a single pt file without a container (like tar).
"""
parts = filename.split('.')
return len(parts) >= 2 and parts[-2] == 'pt'
return len(parts) >= 2 and parts[-2] == 'pt' and parts[-1] != 'symlink'


class CliCompressor:
Expand Down
1 change: 1 addition & 0 deletions tests/utils/test_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def test_is_compressed_pt() -> None:
assert not is_compressed_pt('')
assert not is_compressed_pt('x.lz4')
assert not is_compressed_pt('x.tar.lz4')
assert not is_compressed_pt('x.pt.symlink')


def test_get_invalid_compressor() -> None:
Expand Down

0 comments on commit 3128cee

Please sign in to comment.