Skip to content

Commit

Permalink
Load with weights_only=True
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Sep 19, 2024
1 parent d928ba4 commit ac2e91d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tad_dftd3/data/radii.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _load_vdw_rad_d3(
VDW radii.
"""
path = op.join(op.dirname(__file__), "vdw-d3.pt")
return torch.load(path).type(dtype).to(device)
return torch.load(path, weights_only=True).to(device=device, dtype=dtype)


VDW_D3 = _load_vdw_rad_d3()
2 changes: 1 addition & 1 deletion src/tad_dftd3/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _load_c6(
Reference C6 coefficients.
"""
path = op.join(op.dirname(__file__), "reference-c6.pt")
return torch.load(path).type(dtype).to(device)
return torch.load(path, weights_only=True).to(device=device, dtype=dtype)


class Reference:
Expand Down

0 comments on commit ac2e91d

Please sign in to comment.