kyegomez / LongNet

Implementation of plug in and play Attention from "LongNet: Scaling Transformers to 1,000,000,000 Tokens"
https://discord.gg/qUtxnK2NMf
Apache License 2.0
688 stars 64 forks source link

ModuleNotFoundError: No module named 'LongNet' #16

Closed copi143 closed 1 year ago

copi143 commented 1 year ago

Issue Description:

I encountered an issue while using the pip install LongNet command to install the LongNet package. When attempting to import a module using from LongNet.attention import DilatedAttention, I received the following error:

ModuleNotFoundError: No module named 'LongNet'

Upon investigating the installation directory of pip packages (/usr/local/lib/python3.11/dist-packages), I noticed that the actual installation directory for the LongNet library was named as longnet (all lowercase).

Suggested Resolution:

It appears that there might be a mismatch between the library's name and the installation directory. To resolve this issue, one of the following actions could be taken:

  1. Rename the Installation Directory: Rename the installation directory from longnet to LongNet to match the capitalization of the library's name. This would align the installation directory with the expected import statement.

  2. Adjust Import Statements: Modify the import statements within the library's codebase to use lowercase import paths, matching the installation directory. For example, change from LongNet.attention import DilatedAttention to from longnet.attention import DilatedAttention.

This was generated by ChatGPT based on my description.

Upvote & Fund

Fund with Polar

kyegomez commented 1 year ago

@copi143 Hey should be fixed now!