Comments (3)
@diego-plan9 Do you know what's going on?
from aihwkit.
It seems to boil down to making jupyter
aware of where the package lives - there are a couple of scenarios:
- if using a "developer install", the process concludes with
python setup.py build_ext --inplace
and the package is not installed from pip's perspective. We recommend this approach when intending to make changes to the source code, as it avoids having to reinstall every time a change in the source code is made - the drawback is that it involves manual handling ofPYTHONPATH
. - if using an "advanced install", the process concludes with the package being installed from pip's perspective. This makes it discoverable by pip and the rest of the tools (including jupyter) in the same way as any other package, but makes it more tedious to try new changes in the source code.
I'm inferring your case is more similar to 1 - if that is the case, it might be just a matter of how jupyter is invoked. Assuming (and from your replies on #65 seems like a safe assumption!) you managed to compile and are able to execute the examples, can you try from the root folder of the cloned repo (and inside an activated virtualenv/conda env):
$ PYTHONPATH=/src jupyter notebook
That would be akin to "starting jupyter, instructing the Python interpreter used to invoke jupyter to look into src/
when importing modules". If that is successful (and if you find that pre-pending that string to all your usual commands gets cumbersome), you can make the modification to PYTHONPATH
a bit more permanent by doing:
$ export PYTHONPATH=/path/to/your/cloned_repo/src/
This would set the environment variable for all the commands you issue in that terminal.
If that does not work or you are unable to control how jupyter is launched, there are some workarounds tackling the issue from a different angle - ie. inside Juypter. Within your notebook, you can add a cell at the top with a content similar to:
import sys
sys.path.append("/path/to/your/cloned_repo/src/")
Which can be made more generic by tweaking your jupyter config. However, this workaround tends not to be too portable and I'd recommend trying to solve it via correctly setting the python path - let's see if the first approach yields good results in your environment!
from aihwkit.
Closing as the issue has been inactive for a while: please reopen if needed.
from aihwkit.
Related Issues (20)
- Got runtime error when loading state_dict for AnalogLinearMapped layer HOT 2
- "Misplaced &" in the document HOT 2
- ImportError of libmkl_intel_lp64.so.2 during compiling HOT 9
- Model Initialized outsize [w_min, w_max] HOT 7
- Erroneous reference to "ADD_NORMAL" in WeightNoiseType HOT 2
- Continuing training based on checkpoint using torch tile HOT 7
- fusion_import function modifies the input model with the new conductance data HOT 3
- `WeightModifierType.DISCRETIZE` does not work on CUDA HOT 17
- Question about IOParameters arguments
- Considering weight updates for half-biased devices HOT 4
- Code modification and application method HOT 4
- WeightModifierType.DROP_CONNECT not implemented HOT 4
- Training with half-precision doesn't work for the torch tile or CUDA bindings HOT 10
- For convolutional layers, `convert_to_analog` and `convert_to_analog_mapped` behave differently HOT 1
- Backward pass not ideal when using InferenceRPUConfig HOT 1
- Segment Fault Happens when Applying Gradient Update on TransferCompound on CUDA in Debug Mode HOT 1
- drift on non-backpropagation based algorithms HOT 4
- Model Initialized outsize [w_min, w_max]: Pinpointing the bug in issue #604 HOT 5
- AnalogConv2d incorrectly converts the input size HOT 3
- AnalogConv2d fails when using TT-v2 HOT 5
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 aihwkit.