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

Problem in computing body order energy contributions when evaluating a test set #751

Open
nihil39 opened this issue Dec 16, 2024 · 2 comments

Comments

@nihil39
Copy link

nihil39 commented Dec 16, 2024

Hi,

when I try to run the following command in order to evaluate my test set

mace_eval_configs --model ${MODEL_NAME} --configs ${DATASET_PATH}/${FILE_NAME} --output ${DATASET_PATH}/${FILE_NAME_A}_eval_${MODEL_FOLDER}_cuda.xyz --device cuda --compute_stress --default_dtype float64 --batch_size 5 --return_contributions

I get the following error

Traceback (most recent call last):
  File "/leonardo/home/userexternal/mciacchi/mace_gpu_venv/bin/mace_eval_configs", line 8, in <module>
    sys.exit(main())
  File "/leonardo/home/userexternal/mciacchi/mace_gpu_venv/lib/python3.10/site-packages/mace/cli/eval_configs.py", line 70, in main
    run(args)
  File "/leonardo/home/userexternal/mciacchi/mace_gpu_venv/lib/python3.10/site-packages/mace/cli/eval_configs.py", line 126, in run
    contributions_list.append(torch_tools.to_numpy(output["contributions"]))
KeyError: 'contributions'

if I don't set the --return_contributions flag, everything works.

I think it's a bug but maybe I'm wrong.

Thank you for any help.

@nihil39 nihil39 changed the title Problem in computing body order energy contributions when evaluating the model Problem in computing body order energy contributions when evaluating a test set Dec 16, 2024
@ilyes319
Copy link
Contributor

return_contributions is not supported for the ScaleShiftMACE models. I think I ll just remove this anyway, it made more sense at the botnet time, but with MACE, the body order are already summed at each layer, such that you can not really analyse the full expansion this way.

@nihil39
Copy link
Author

nihil39 commented Dec 16, 2024

return_contributions is not supported for the ScaleShiftMACE models. I think I ll just remove this anyway, it made more sense at the botnet time, but with MACE, the body order are already summed at each layer, such that you can not really analyse the full expansion this way.

Ok, thanks. I was in fact trying to evaluate a MACE model, not a ScaleShiftMACE one.

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