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

CHGNet wrapper for pretrained models does not load the correct path when NFF is installed using pip #24

Open
xiaochendu opened this issue Jul 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@xiaochendu
Copy link
Contributor

In nff/nn/models/chgnet.py it assumes the pretrained CHGNet models in ./models are installed in addition to ./nff, which is not the case. Currently pip only installs ./nff as a package.

   @classmethod
    def load(cls, model_name: str = "0.3.0", **kwargs) -> CHGNetNFF:
...
        try:
            checkpoint_path = {
                "0.3.0": "../../../models/foundation_models/chgnet/0.3.0/chgnet_0.3.0_e29f68s314m37.pth.tar",
                "0.2.0": "../../..models/foundation_models/chgnet/0.2.0/chgnet_0.2.0_e30f77s348m32.pth.tar",
            }[model_name]
...
@xiaochendu xiaochendu self-assigned this Jul 19, 2024
@xiaochendu xiaochendu added the bug Something isn't working label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant