brian2genn
brian2genn copied to clipboard
use individually named dir instead of GeNNworkspace
This makes sense for at least two reasons:
- It will allow the GeNN caching system to reduce recompilations
- it will avoid errors when the contents of GeNNworkspace are partially overwritten for different models We need to find the optimal naming convention of the working directory that is model-specific.
We use the following trick in PyNN GeNN to name the model after the name of the PyNN script (in the case of PyNN we do this in the setup(...)
function to obtain the name of the python module which calls it):
import inspect
calframe = inspect.getouterframes(inspect.currentframe(), 1)
# Extract model name and path
model_name = os.path.splitext(os.path.basename(calframe[1][1]))[0]
model_name = sanitize_label(model_name)