Skip to content

Commit

Permalink
Merge pull request #10 from tplr-ai/hotfix/norms
Browse files Browse the repository at this point in the history
fix: bug in norms
  • Loading branch information
distributedstatemachine authored Dec 24, 2024
2 parents b96b73c + 378bda5 commit f1f8933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/templar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# mypy: ignore-errors
# type: ignore

__version__ = "0.1.18"
__version__ = "0.1.27"
version_key = 3000

# Import package.
Expand Down
4 changes: 2 additions & 2 deletions src/templar/comms.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ async def validate_slice_data(slice_file: str, save_location: str) -> bool:
"""
try:
# Load the slice data
slice_data = torch.load(slice_file)
slice_data = torch.load(slice_file, weights_only=True)

# Basic validation checks
if not isinstance(slice_data, dict):
Expand Down Expand Up @@ -1070,7 +1070,7 @@ async def load_checkpoint(
additional_state (dict): Dictionary of additional state variables.
"""
try:
checkpoint = torch.load(filename, map_location=device)
checkpoint = torch.load(filename, map_location=device, weights_only=True)
model.load_state_dict(checkpoint["model_state_dict"])
if optimizer and "optimizer_state_dict" in checkpoint:
optimizer.load_state_dict(checkpoint["optimizer_state_dict"])
Expand Down

0 comments on commit f1f8933

Please sign in to comment.