Comments (7)
Correct me if I'm wrong, but I believe it works if you import everything from the lecture2notes namespace. Does it work if you use the project like so from lecture2notes.end_to_end.summarizer_class import LectureSummarizer
?
Specifically for running the main.py
script, you should run it as a module with python -m lecture2notes.end_to_end.main
so that it can resolve the relative imports. Let me know if this helps!
from lecture2notes.
I had the same issue when I was trying to run the project on Colab. The relative import seems to be an issue for some reason even though I set the system path to lecture2notes directory.
I moved the models folder to end_to_end and replaced all relative imports in all files. Seems to work fine right after.
from lecture2notes.
from lecture2notes.
For running themain.py
I did try that -
- Appended
sys.path
withlecture2notes
directory - Tried the same command as you mentioned.
No luck though, this is is the error --
Error while finding module specification for 'lecture2notes.end_to_end.main' (ModuleNotFoundError: No module named 'lecture2notes')
For the import, error is -
ModuleNotFoundError: No module named 'lecture2notes'
Also, I'm seeing this issue only on Google Colab!
from lecture2notes.
After installing the requirements, running the following in Google Colab works for me:
!git clone https://github.com/HHousen/lecture2notes
%cd lecture2notes
!python -m lecture2notes.end_to_end.main --help
Depending on which directory you added to sys.path
, you might need to import from lecture2notes.lecture2notes
or run this command instead: python -m lecture2notes.lecture2notes.end_to_end.main
. This is because the actual lecture2notes package is located inside the lecture2notes
directory within the repo. When git clones the repo it creates a directory called lecture2notes
, which can make it confusing to work with.
from lecture2notes.
You are right, it does work as expected. I'm not sure why it didn't earlier. Might have missed something. Thank you for taking time out and providing the clarification! :)
from lecture2notes.
You're welcome 😄!
from lecture2notes.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lecture2notes.