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

metnet 2 import issue #70

Open
tarunluthra opened this issue Nov 14, 2024 · 0 comments
Open

metnet 2 import issue #70

tarunluthra opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tarunluthra
Copy link

I am facing issues after installing Metnet2, I am running on python 3.9.2 in a conda environment.

Bug Report

Describe the Bug

Attempting to import MetNet and MetNet2 from the metnet package results in a ModuleNotFoundError. Specifically, the error indicates that the module metnet.layers cannot be found:

ModuleNotFoundError: No module named 'metnet.layers'; 'metnet' is not a package

This error occurs when attempting to run the following code:

from metnet import MetNet, MetNet2

# Load pre-trained models
model = MetNet().from_pretrained("openclimatefix/metnet")
model = MetNet2().from_pretrained("openclimatefix/metnet-2")

To Reproduce

Steps to reproduce the behavior:

  1. Ensure that the metnet repository is cloned and installed.
  2. Open a Python environment within the project directory.
  3. Run the import statements and model loading code:
    from metnet import MetNet, MetNet2
    model = MetNet().from_pretrained("openclimatefix/metnet")
    model = MetNet2().from_pretrained("openclimatefix/metnet-2")
  4. Observe the ModuleNotFoundError.

Expected Behavior

The expected behavior is that the MetNet and MetNet2 classes are successfully imported, and the from_pretrained method loads pre-trained models without errors.

Additional Context

  • Error Message:
    ModuleNotFoundError: No module named 'metnet.layers'; 'metnet' is not a package
    

can anyone help me with this?

@tarunluthra tarunluthra added the bug Something isn't working label Nov 14, 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

No branches or pull requests

1 participant