You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/runner/work/hongbomiao.com/hongbomiao.com/machine-learning/graph-neural-network/src/main.py", line 103, in main
dataset, split_idx = fetch_dataset(config)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/hongbomiao.com/hongbomiao.com/machine-learning/graph-neural-network/src/model/data_loader.py", line 13, in fetch_dataset
dataset = PygGraphPropPredDataset(name=config.dataset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/hongbomiao.com/hongbomiao.com/machine-learning/graph-neural-network/.venv/lib/python3.12/site-packages/ogb/graphproppred/dataset_pyg.py", line 68, in __init__
self.data, self.slices = torch.load(self.processed_paths[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/hongbomiao.com/hongbomiao.com/machine-learning/graph-neural-network/.venv/lib/python3.12/site-packages/torch/serialization.py", line 1470, in load
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in`torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only`set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL torch_geometric.data.data.DataEdgeAttr was not an allowed global by default. Please use `torch.serialization.add_safe_globals([DataEdgeAttr])` or the `torch.serialization.safe_globals([DataEdgeAttr])` context manager to allowlist this global if you trust this class/function.
I am wondering if the library should handle this issue in a future version, or if we should add something like:
When upgrade from PyTorch 2.5.1 to 2.6.0, for code like
I got error:
I am wondering if the library should handle this issue in a future version, or if we should add something like:
What would be the recommended approach? Thank you!☺️
The text was updated successfully, but these errors were encountered: