LDM-3DG
LDM-3DG copied to clipboard
Error in evaluation step for Conditional Generation on Geometric Object
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:
- 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'])tomodel.load_state_dict(torch.load('../AE_geom_cond_weights_and_data/weight_diffusion.pt')['model']) - 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?
Hi @JiashuLiang,
This might result from multiple reasons. You probably need to remove the try/except https://github.com/Shen-Lab/LDM-3DG/blob/45c3a91a7895fefe38b8ec383f5fd64244c55e03/AE_Geometry_and_Conditional_Latent_Diffusion/scripts/evaluate.py#L100 to allow the error messages printed.