Skip to content

Commit 412aa17

Browse files
committed
zarr soft deprecation
Signed-off-by: dimapihtar <[email protected]>
1 parent 2dac593 commit 412aa17

File tree

1 file changed

+10
-3
lines changed
  • megatron/core/dist_checkpointing/strategies

1 file changed

+10
-3
lines changed

megatron/core/dist_checkpointing/strategies/zarr.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class ZarrSaveShardedStrategy(SaveShardedStrategy):
7777

7878
def __init__(self, backend: str, version: int):
7979
super().__init__(backend, version)
80-
logger.warning(
81-
f"`zarr` distributed checkpoint backend is deprecated."
82-
" Please switch to PyTorch Distributed format (`torch_dist`)."
80+
raise CheckpointingException(
81+
"`zarr` distributed checkpoint backend is no longer supported. "
82+
"Please switch to PyTorch Distributed format (`torch_dist`)."
8383
)
8484

8585
def save(self, sharded_state_dict: ShardedStateDict, checkpoint_dir: Union[str, Path]):
@@ -196,6 +196,13 @@ def _create_zarr_array(sharded_tensor: ShardedTensor, checkpoint_dir: Path):
196196

197197
class ZarrLoadShardedStrategy(LoadShardedStrategy):
198198
"""Load strategy for the Zarr backend."""
199+
200+
def __init__(self, backend: str, version: int):
201+
super().__init__(backend, version)
202+
raise CheckpointingException(
203+
"`zarr` distributed checkpoint backend is no longer supported. "
204+
"Please switch to PyTorch Distributed format (`torch_dist`)."
205+
)
199206

200207
def load(self, sharded_state_dict: ShardedStateDict, checkpoint_dir: Union[str, Path]):
201208
if isinstance(checkpoint_dir, str):

0 commit comments

Comments
 (0)