-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect behavior for atom_messages = True #133
Comments
The bond feature vector in BatchMolGraph are indeed constructed using both the atom and bond features. When the bond feature vector is called for the MPNN (BatchMolGraph.get_components(atom_messages=True)) the size of the bond feature vector is corrected and the atom features are removed. |
I am talking about this line: chemprop/chemprop/features/featurization.py Line 206 in 8258fcb
But I can run some tests tomorrow and submit a proper bug report if needs be |
Thank you for your question! Just had a look - I agree with Florence. Upon initialising BatchMolGraph, the bond dimensions are set up alike no matter whether atom messages are used or not (line 206), and the bond features are set up with the full vector (bond + atom features). But when returning the atom and bond features in chemprop/chemprop/features/featurization.py Lines 246 to 272 in 8258fcb
This may be a bit clumsy (and there might be faster ways to do this), but correct. I will close this issue for now, but please feel free to reopen if you have further questions! Yours, Esther |
While looking through the code more thoroughly today, I noticed that there actually IS a bug (although a different one than reported): We set up the bond features in the order atom(length 133)-bond(length 14): chemprop/chemprop/features/featurization.py Lines 171 to 172 in 8258fcb
but then cut out the first (!) 14 values, instead of the last: chemprop/chemprop/features/featurization.py Lines 267 to 270 in 8258fcb
Can someone else confirm this, so I can write a PR? |
@hesther It looks this way to me as well |
I think there is currently a bug where args.atom_messages = True.
BatchMolGraph uses the get_bond_dim() function without forwarding the argument which seems will lead to incorrect dimension of the bond features.
The text was updated successfully, but these errors were encountered: