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

Error in evaluation step for Conditional Generation on Geometric Object #3

Open
JiashuLiang opened this issue May 9, 2024 · 1 comment

Comments

@JiashuLiang
Copy link

JiashuLiang commented May 9, 2024

Hi Authors,

Congrats on the great work! I am trying to develop a flow-matching version of your work, but I encounter some challenges when reproducing your work on Conditional Generation on Geometric Objects.

When I ran Sampling and evaluating commands, I encountered the following error for all data_id I tried.

[2024-05-08 23:53:49,959::evaluate::INFO] Vina Score:  Mean: nan Median: nan
[2024-05-08 23:53:49,959::evaluate::INFO] Vina Min  :  Mean: nan Median: nan
Traceback (most recent call last):
  File "/global/cfs/cdirs/mp54/jsliang/MLFF/conda_envs/eval/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/global/cfs/cdirs/mp54/jsliang/MLFF/conda_envs/eval/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/global/cfs/cdirs/mp54/jsliang/LFM-3DG/AE_Geometry_and_Conditional_Latent_Diffusion/scripts/evaluate.py", line 154, in <module>
    print_ring_ratio([r['chem_results']['ring_size'] for r in results], logger)
  File "/global/cfs/cdirs/mp54/jsliang/LFM-3DG/AE_Geometry_and_Conditional_Latent_Diffusion/scripts/evaluate.py", line 34, in print_ring_ratio
    logger.info(f'ring size: {ring_size} ratio: {n_mol / len(all_ring_sizes):.3f}')
ZeroDivisionError: division by zero

What I changed are:

  1. the model used in sample_z because I do not have the folder ldm_2023_11_16__18_01_30
    model.load_state_dict(torch.load('logs_diffusion/ldm_2023_11_16__18_01_30/checkpoints/30000.pt')['model'])
    to
    model.load_state_dict(torch.load('../AE_geom_cond_weights_and_data/weight_diffusion.pt')['model'])
  2. the version name from 'final-001' to 'final' in pl_pair_dataset.py to match the file name in https://github.com/guanjq/targetdiff#data
    def __init__(self, raw_path, transform=None, version='final'):
    Can you help check what's wrong?
@yyou1996
Copy link
Collaborator

Hi @JiashuLiang,

This might result from multiple reasons. You probably need to remove the try/except

to allow the error messages printed.

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