{"agent":"claude","input":"Loading a checkpoint fails on PyTorch 2.6 or later with \"_pickle.UnpicklingError: Weights only load failed\". Find every call to torch.load in the repository, including through wrappers, and every torch.save that writes the files those calls read. For each load, build a row: file and line, what object is saved (a state_dict, a dict of tensors and plain values, a whole nn.Module, an optimizer, anything else), where the file comes from (written by this project's own code, shipped in the repository, downloaded from a URL, supplied by a user), and whether weights_only is already passed. Then fix each call according to its row. If the file holds only tensors and plain containers, leave the default and confirm it loads. If it holds a few extra known types such as argparse.Namespace or NumPy scalars, keep weights_only=True and allow-list exactly those types with torch.serialization.safe_globals around the call. If it holds a whole pickled model or other arbitrary objects and is written only by this project's own code to local storage, pass weights_only=False explicitly with a one-line comment stating that the file is trusted and why. If such a file can come from a download, an upload or any third party, do not pass weights_only=False: stop, report the call, and propose converting that checkpoint format to a state_dict. Do not pin PyTorch to an older version. Install a current CPU build of PyTorch and, for each load you changed, create a small object of the saved type with the project's own code, save it with the project's save function, and load it with the project's load function, once before your change to capture the error and once after. Include the commands and output. Do not download any checkpoint from the internet. In the pull request description include the table, and for every weights_only=False you added, describe what a state_dict-based format would require (constructor arguments to store, a conversion script for existing files) without implementing it.","resources":[{"url":"https://github.com/your-org/your-app"}]}