-
Notifications
You must be signed in to change notification settings - Fork 2
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
Powertrain module import issues on install #23
Comments
Another potential solution is to have users run a start script that activates the environment and runs a .py version of these notebooks, given that they've set values properly. For example, the path to the CSV could be set as an environment variable prior to running, or used as an argument. ie:
or, without a start script:
where model-training-notebook.py uses |
@nataliejschultz - after giving this more thought, I am starting to converge on the idea that we discussed with Nick last week, where our demo notebooks and scripts live in a separate repo. This mainly appeals to me because most users will not be installing powertrain from source, rather they will just install from PyPi or similar, so they will not readily have access to the demos that are buried in the package source code, right? |
I think this is a good idea!
Nope, not if it's in a different repo and isn't integrated into the powertrain module. |
In installing powertrain for the first time, I ran into some issues with running the notebooks. After cloning the repo and installing the environment + rust per install instructions:
I made sure that powertrain was pip3 installed in both my base and powertrain envs.
base
powertrain conda env
I installed the powertrain scikit in the routee env:
and chose the routee env as my kernel to run. However, trying to run the notebook results in a
module not found
error.So, I tried running the same command in a python REPL (activated in the exact same directory as the model_training.ipynb), and it worked just fine:
I believe the issue is due to relative import complications with ipynb specifically. It may be resolved by moving the notebook to a new location, or adding a small path script to the top of the notebook.
The text was updated successfully, but these errors were encountered: