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
I have searched the existing issues and found nothing
Bug description
Trying to use jtvae_zinc_no_kl to featurize a SMILES dataset, code adapted from https://molfeat.datamol.io/featurizers/jtvae_zinc_no_kl to run as a python script.
The step features = transformer(smiles) throws a series of errors due to os.unlink(tmp_file.name) on dgl_pretrained.py
(molfeat-env) C:\Users\rafae\Desktop\jtnn>python jtnn.py
Extracting file to C:\Users\rafae\.dgl/jtvae
Traceback (most recent call last):
File "C:\Users\rafae\Desktop\jtnn\jtnn.py", line 8, in <module>
features = transformer(smiles)
File "C:\Users\rafae\miniconda3\envs\molfeat-env\lib\site-packages\molfeat\trans\base.py", line 385, in __call__
features = self.transform(mols, ignore_errors=ignore_errors, enforce_dtype=False, **kwargs)
File "C:\Users\rafae\miniconda3\envs\molfeat-env\lib\site-packages\sklearn\utils\_set_output.py", line 273, in wrapped
data_to_wrap = f(self, X, *args, **kwargs)
File "C:\Users\rafae\miniconda3\envs\molfeat-env\lib\site-packages\molfeat\trans\pretrained\base.py", line 208, in transform
out = self._embed(converted_mols, **kwargs)
File "C:\Users\rafae\miniconda3\envs\molfeat-env\lib\site-packages\molfeat\trans\pretrained\dgl_pretrained.py", line 222, in _embed
dataset, successes = self.graph_featurizer(smiles, kind=self.kind)
File "C:\Users\rafae\miniconda3\envs\molfeat-env\lib\site-packages\molfeat\trans\pretrained\dgl_pretrained.py", line 258, in graph_featurizer
os.unlink(tmp_file.name)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
Environment
Current environment
OS: Windows 10
dgl 2.0.0
dgllife 0.3.2
molfeat 0.10.0
#- How you installed Molfeat: conda
Additional context
No response
The text was updated successfully, but these errors were encountered:
Update: I commented out the os.unlink(tmp_file.name) line and it appeared to work, with the warning:
C:\Users\rafae\miniconda3\envs\molfeat-env\lib\site-packages\dgl\core.py:82: DGLWarning: The input graph for the user-defined edge function does not contain valid edges
dgl_warning(
However, now that I tried with a larger dataset, I get the same KeyError: 'C1=CNN=C1' as mentioned in the link above.
One person suggested using rdkit 2018, so I will try to create an environment with Python 3.7 and rdkit 2018 tomorrow and see if it works. This does not seem compatible with molfeat, though, as the dependency is python>3.8
There seems to be a compatibility problem with JTVAE.
From https://github.com/awslabs/dgl-lifesci: If you need to work on the example of JTVAE, then you need RDKit 2018.09.3.
And this is not compatible with molfeat (python>3.8)
Is there an existing issue for this?
Bug description
Trying to use jtvae_zinc_no_kl to featurize a SMILES dataset, code adapted from https://molfeat.datamol.io/featurizers/jtvae_zinc_no_kl to run as a python script.
The step
features = transformer(smiles)
throws a series of errors due toos.unlink(tmp_file.name)
on dgl_pretrained.pyHow to reproduce the bug
Error messages and logs
Environment
Current environment
Additional context
No response
The text was updated successfully, but these errors were encountered: