Comments (4)
Thanks for reminding me this bug. It is caused by the duplication of 'EOS' in vocabulary defined in the file of 'voc.txt'. I have modified the 'util.py' and removed the 'EOS' defined in token sequences. If you do not want to regenerate the corpus, you can simply remove 'EOS' in the file of 'voc.txt'
from drugex.
I checked this part of code in my own machine (PyTorch = 1.0 or 1.3 stable), but I did not find such a bug. Could you tell me the version of PyTorch?
from drugex.
Thank you very much! The version of my pytorch is higher and I have alreadly figure the problem out! But now, I have met another error, when I train prior model on the data zinc_corpus.txt, it occurs keyerror when encode, so I modify voc = util.Voc("data/voc.txt")
to voc = util.Voc("data/zinc_voc.txt")
, then keyerror in encode disappeared, but now decode occurs keyerror again, this time I am confused.
Traceback (most recent call last):
File "pretrainer.py", line 60, in <module>
main()
File "pretrainer.py", line 27, in main
prior.fit(zinc, out=netP_path)
File "/home/tensorflow/DrugEx/model.py", line 428, in fit
smiles, valids = util.check_smiles(seqs, self.voc)
File "/home/tensorflow/DrugEx/util.py", line 232, in check_smiles
smile = voc.decode(seq)
File "/home/tensorflow/DrugEx/util.py", line 94, in decode
chars.append(self.ix2tk[i])
KeyError: 0
from drugex.
Thank you very much.
from drugex.
Related Issues (20)
- Package code and make pip installable HOT 1
- Error module 'rdkit.Chem' has no attribute 'MolFromSimles' HOT 4
- It will be great if you would like to provide some examples HOT 2
- Running Multitarget with smiles? HOT 3
- DrugEx-1.0 about figure6 HOT 2
- Zinc models HOT 3
- Link to Dataset.
- miss file /data/chembl_voc.txt HOT 3
- `environ.py` does not work HOT 1
- UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 63: ordinal not in range(128) HOT 1
- Missing zinc/ folder HOT 1
- how to use or simply start? any example? HOT 1
- NameError: name 'Dataset' is not defined HOT 2
- No utils.canonicalize_list in Drug_ex v2.0 HOT 2
- No such file or directory: 'data/LIGAND_RAW.tsv' HOT 13
- AttributeError: 'int' object has no attribute 'predict_proba' HOT 2
- Error using designer with the default agent
- Keyerror has been occurred when I run pretrainer.py HOT 4
- MT_DNN HOT 1
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 drugex.