Error in f.to_pyg_graph(): TypeError: type object got multiple values for keyword argument 'pos'
Closed this issue · 1 comments
Hello, I am trying to run your code, but I am facing a problem when creating the dataset. Particularly on line 54 of the dataset_featurizer.py, where we are transforming to a Pytorch Geometric graph using:
data = f.to_pyg_graph()
I run into this error:
TypeError: type object got multiple values for keyword argument 'pos'
The f in this case looks like this:
GraphData(node_features=[46, 30], edge_index=[2, 108], edge_features=[108, 11], pos=[0])
This has been created from row = ('level_0', 0) ('Unnamed: 0', 3999) ('index', 3999) ('smiles', 'CSc1cc2[n+]3c(c1)-c1cccc[n+]1[Zn-4]314([n+]3ccccc3-2)[n+]2ccccc2-c2cc(SC)cc([n+]21)-c1cccc[n+]14.[O-]Cl+3([O-])[O-]') ('activity', 'CI') ('HIV_active', 0)
I don't really know what to do or how to solve it.
Maybe you could also upload the content in /data/processed, so that this issue is solved.
Help please, I am very stuck with this issue and I cannot run your code.
Thank you for your time.
Hi!
Here are a couple of propositions to get around your issue:
- Use the dataset.py instead of the featurizer, then you don't have to do the conversion from deepchem
- The issue you describe is known on the deepchem side (see here: deepchem/deepchem#3090), so maybe try to update to the version of their fix
- Manually remove "pos" from the attributes to remove the error in a hacky way
Hope this helps