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

Running optimize_ga.py #8

Closed
tkram01 opened this issue Apr 15, 2022 · 3 comments
Closed

Running optimize_ga.py #8

tkram01 opened this issue Apr 15, 2022 · 3 comments

Comments

@tkram01
Copy link

tkram01 commented Apr 15, 2022

I'm trying to test everything is working in my setup by running

python optimize_ga.py --radius 2 --nbits 4096 --num_population 128 --num_offspring 512 --num_gen 200 --ncpu 48

It seems to run forever with the following output

Using backend: pytorch
Downloading gin_supervised_contextpred_pre_trained.pth from https://data.dgl.ai/dgllife/pre_trained/gin_supervised_contextpred.pth...
Pretrained model loaded
Downloading gin_supervised_contextpred_pre_trained.pth from https://data.dgl.ai/dgllife/pre_trained/gin_supervised_contextpred.pth...
Pretrained model loaded
Starting with 128 fps with 4096 bits
mat1 and mat2 shapes cannot be multiplied (1x12292 and 12288x1200)
mat1 and mat2 shapes cannot be multiplied (1x12292 and 12288x1200)
mat1 and mat2 shapes cannot be multiplied (1x12292 and 12288x1200)
mat1 and mat2 shapes cannot be multiplied (1x12292 and 12288x1200)
...
mat1 and mat2 shapes cannot be multiplied (1x12292 and 12288x1200)
mat1 and mat2 shapes cannot be multiplied (1x12292 and 12288x1200)
Initial: 0.000 +/- 0.000
Scores: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
 0. 0. 0. 0. 0. 0. 0. 0.]
Top-3 Smiles: [None, None, None]

How long should this run and is this output normal?

@rociomer
Copy link
Collaborator

Thanks for pointing out this bug. Looks like there was an issue with the dimensions of the reactant 1 predictor model and the dimensions of the input to that model. Since the state embedding is concatenated with the action embedding, the size should be +4 that of what it was in the code when you ran it previously (which is why it sums up to 12288 rather than 12292). 12288 is only the size of the the state embedding (3*4096), without the additional action embedding dimension (4).

I have made a fix to syn_net/utils/predict_utils.py in the code, which means the code should run once you pull those changes. But I need to update the unittests as well to reflect this.

And yes, it does run quite a long time the first time you run this but any subsequent runs should be quick.

@rociomer
Copy link
Collaborator

Actually, the reactant 1 network should only receive as input the state embedding, and I made a mistake in what I answered above. I have updated the code and tests to reflect this. There was an error in the synthetic tree decoder function, which led to a mismatch in dimensions (fixed now).

@rociomer
Copy link
Collaborator

We have addressed this and other issues in the new version of SynNet (thanks to @chrulm!). Closing this for now.

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

2 participants