Skip to content

dataset load is not successful: shows error #11

@mmrahman21

Description

@mmrahman21

Dear Team,

I was trying to download your HCPGender dataset using neurograph package. I just executed the following code:

from NeuroGraph.datasets import NeuroGraphDataset
dataset = NeuroGraphDataset(root="data/", name= "HCPGender")
print(dataset.num_classes)
print(dataset.num_features)

The dataset was not loaded and shows error. The error is related to PyTorch 2.6 and the weights_only=True change. I am using PyTorch 2.6.

I received this error:

"(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."

If you could take appropriate steps to solve the issue or provide me some guidelines so that I can download the dataset that would be helpful.

Thank you.

Regards,
Mahfuz


Md Mahfuzur Rahman
Lecturer, Computer Science
Georgia State University

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions