Skip to content

Commit

Permalink
Add more whitelisted variables for torch safe loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Kh4L committed Sep 11, 2024
1 parent 546f1a2 commit 903daa8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions torch_frame/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@

if WITH_PT24:
import torch
import numpy as np
import _codecs

torch.serialization.add_safe_globals([
stype,
torch_frame.data.stats.StatType,
np.core.multiarray.scalar,
np.dtype,
type(np.dtype(np.int32)),
_codecs.encode,
])

__version__ = '0.2.3'
Expand Down

0 comments on commit 903daa8

Please sign in to comment.