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

main.py issues/improvements for mass inference with an ase-db with a checkpoint #539

Open
jkitchin opened this issue Jul 21, 2023 · 2 comments
Labels
dont-close enhancement New feature or request

Comments

@jkitchin
Copy link

It isn't obvious how to do mass inference on an ase-db with main.py.

Something like:

python main.py --mode predict --checkpoint gnoc_oc22_oc20_all_s2ef.pt --task.dataset=ase_db --test_dataset.src=data.db

should be sufficient I think, but this fails because --config-yml is a required argument. Given the checkpoint, I think it should not be required, at best it duplicates the model information, and at worst could be inconsistent with what is in the checkpoint. For predictions, it is hard to see why you should change the model.

Even when I make a config.yml file though, it appears you have to populate both train and test datasets

                           'dataset.train.a2g_args.r_energy': False,
                           'dataset.train.a2g_args.r_forces': False,
                            # Test data - prediction only so no regression
                           'dataset.test.src': 'data.db',
                           'dataset.test.a2g_args.r_energy': False,
                           'dataset.test.a2g_args.r_forces': False,

                          })

or you get an error

  File "/home/jovyan/shared-scratch/jkitchin/tutorial/ocp-tutorial/fine-tuning/ocp/ocpmodels/trainers/base_trainer.py", line 344, in load_datasets
    if self.normalizer.get("normalize_labels", False):
AttributeError: 'NoneType' object has no attribute 'get'

This also doesn't make sense to me, I think you should only need to specify the source you want to make predictions from.

I guess this isn't very specific to ase-db, and also applies to other data sources like lmdb.

@mshuaibii
Copy link
Collaborator

Adding to OCP 2.0 planned changes #520

@mshuaibii mshuaibii added the enhancement New feature or request label Jul 27, 2023
@mshuaibii mshuaibii mentioned this issue Jul 27, 2023
19 tasks
@github-actions
Copy link

This issue has been marked as stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 27, 2023
@abhshkdz abhshkdz added dont-close and removed stale labels Aug 29, 2023
@mshuaibii mshuaibii moved this to Backlog in Enhancements Apr 8, 2024
@mshuaibii mshuaibii moved this from Backlog to In Progress in Enhancements Apr 8, 2024
@mshuaibii mshuaibii moved this from In Progress to Backlog in Enhancements Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-close enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants