Skip to content

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

Description

@xiaochendu

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]
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions