Comments (2)
Getting the same issue - here's the exact error message for others' reference:
python preprocess.py --train data/chembl/all.txt --vocab data/chembl/vocab.txt --ncpu 16 --mode single
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/marcase/.conda/envs/conda-test/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/marcase/.conda/envs/conda-test/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/marcase/hgraph2graph/preprocess.py", line 19, in tensorize
x = MolGraph.tensorize(mol_batch, vocab, common_atom_vocab)
File "/home/marcase/hgraph2graph/hgraph/mol_graph.py", line 153, in tensorize
tree_tensors, tree_batchG = MolGraph.tensorize_graph([x.mol_tree for x in mol_batch], vocab)
File "/home/marcase/hgraph2graph/hgraph/mol_graph.py", line 194, in tensorize_graph
fnode[v] = vocab[attr]
File "/home/marcase/hgraph2graph/hgraph/vocab.py", line 43, in __getitem__
return self.hmap[x[0]], self.vmap[x]
KeyError: 'C1=NN=CN1'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/marcase/hgraph2graph/preprocess.py", line 106, in <module>
all_data = pool.map(func, batches)
File "/home/marcase/.conda/envs/conda-test/lib/python3.10/multiprocessing/pool.py", line 364, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/home/marcase/.conda/envs/conda-test/lib/python3.10/multiprocessing/pool.py", line 771, in get
raise self._value
KeyError: 'C1=NN=CN1'
from hgraph2graph.
Found a super easy solution to this problem - just generate a fresh vocab from the dataset rather than using the one provided. I think an rdkit update changed a couple of the ways the smiles strings are generated, particularly from the aromatic groups (this was mentioned in another issue thread).
from hgraph2graph.
Related Issues (20)
- Out-of-memory occurs at preprocessing training data HOT 2
- Regarding structural motifs (bee hives) HOT 3
- Chem.Kekulize(mol) error HOT 3
- Regarding relation between train_pairs.txt and mol.txt
- chemprop_model details HOT 2
- Vocabulary
- Question Polymer Data
- Question about constraint optimization
- All assm_labels are zero?
- how to convert the chembl checkpoint kept file to an binary format
- PicklingError("Can't pickle <class 'Boost.Python.ArgumentError'>: import of module 'Boost.Python failed")' HOT 7
- README error HOT 7
- Unrecognized arguments: --nsamples 1000 HOT 1
- IndexError: tuple index out of range HOT 12
- Getting error while running pip install . HOT 3
- TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first HOT 2
- TypeError: forward() missing 2 required positional arguments: 'y_orders' and 'beta' HOT 2
- AssertionError HOT 12
- Some motifs in generated vocabulary are not parseable for rdkit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hgraph2graph.