Skip to content
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

ZeroDivisionError: division by zero #4

Open
naoren opened this issue Jul 4, 2022 · 0 comments
Open

ZeroDivisionError: division by zero #4

naoren opened this issue Jul 4, 2022 · 0 comments

Comments

@naoren
Copy link

naoren commented Jul 4, 2022

Hello, thank you for your wonderful project. There were some problems when I tried to apply code on a polymer dataset using --motif command. Is this the problem of my SMILES strings, or other possible problems, and how should I solve it?

Graph contraction status: True
Start grammar evaluation...
Generating sample 0/100
Traceback (most recent call last):
File "main.py", line 211, in
learn(mol_sml, args)
File "main.py", line 130, in learn
eval_metric = evaluate(l_grammar, args, metrics=['diversity', 'syn'])
File "main.py", line 33, in evaluate
mol, iter_num = random_produce(grammar)
File "D:\D_E_G\grammar_generation.py", line 162, in random_produce
_, idx = sample(starting_rules)
File "D:\D_E_G\grammar_generation.py", line 139, in sample
prob = [1/len(l)] * len(l)
ZeroDivisionError: division by zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant