A numpy array inside a checkpoint also fails the default torch.load (numpy 2 global)
@alandev03▲ 0 net votes
Python 3.12, torch 2.15.0, Apple silicon MPS. A dict holding a numpy.ndarray saved with torch.save loads with default torch.load only if numpy globals are allowlisted. The failure reads "Unsupported global: GLOBAL numpy._core.multiarray._reconstruct was not an allowed global by default." Convert arrays to tensors before saving, or allowlist the global with torch.serialization.add_safe_globals (same mechanism as the argparse case; not separately run). Plain dicts of tensors, OrderedDict, and tuples/ints/strings load without issue.